一款简单的菜单栏倒数日App. 支持中英德文显示以及自定义间隔符.
使用OAuthSwift完成微博OAuth2.0授权
昨天关于新浪的授权鼓捣了一天才弄好,所以写一个这个过程。主要用到的是OAuthSwift(一个适用于iOS/macOS等的OAuth库,支持1.0和2.0)
另外关于整个授权的过程,Practical Guide for using Sina Weibo’s API 也很有帮助。
- 新浪开发者,申请App,填写认证和App资料(略)
- 在project中导入OAuthSwift库(略)
- 授权 doOAuthWeibo
|
|
- 关于callback URL
因为微博只接受http格式的URL,所以我在自己博客新建了一个页面作为callback URL(http://kelicheng.github.io/simple-sender/)
在这个页面放一段代码重新定向到App中。1234<script type="text/javascript">var query = window.location.href.replace("http://your/callback/url", "YourAppName://oauth-callback/");window.location.assign(query)</script>
此外还要在project中设置URL Schemes:
Targets -> (YourAPP) -> Info -> URL Types -> Add -> URL Schemes = YourAppName
OAuthSwift的作者还给出了Ruby和PHP的代码示例,以及另一种使用内置浏览器授权的解决方案。详见:https://github.com/OAuthSwift/OAuthSwift/wiki/API-with-only-HTTP-scheme-into-callback-URL
Simpo | the simple way of posting
Time: 2017-01-16 ~
Download
Github: https://github.com/KeliCheng/Simpo
一款快速发布文字和图片到社交网站的macOS菜单栏App,目前支持饭否/Twitter/微博多账户登录。
Version
2017-01-26 v.1.0.0:
-支持饭否多账户登录
-可以发送图片和文字
-自定义字体及背景颜色,管理草稿。
2017-02-01 v.1.0.1:
-支持Twitter账户登录
2017-02-03 v.1.0.2:
-支持微博账户登录
2017-02-19 v.1.1.0:
- 全新UI设计
- 更多自定义选项
- 新增字体以及歌词显示
tips
打开App如果出现提示为未认证作者:
打开System Preference系统设置 –> Security & Privacy 安全和隐私 –> General –> 点击左下角小锁 –>
看是否出现 Open Simpo Anyway, 如果没有,尝试关闭之前出现的提示; 如果有,点击Open Anyway,再重启AppTwitter/微博登录没有反应:打开默认浏览器重试
打开设置(添加账户)/退出:右键点击菜单栏图标
切换账户:点击左上角头像
Twitter/微博授权后有两个程序被打开:将两个程序都关闭后重启Simpo,或尝试使用Chrome等作为默认浏览器
Breakout Game
https://github.com/KeliCheng/Breakout
A classic breakout game with customized settings. CS193p Assignment 6.
2017.01.08 - 2017.01.16
TODO:
- support gravitational pull
- support adjust of ball bounciness
- fix alert when game ends
修改hexo/NexT主题
参考:
http://zhouhuix.cn/2016/11/24/修改Hexo的Next主题/
鉴于NexT已经更新,之前很多修改颜色字体的方法也失效。
以下方案适用于NexT Version 5.1.0
修改博客背景颜色
/themes/next/source/css/_schemes/Pisces/_layout.styl
|
|
修改内容背景色
|
|
修改字体
/themes/next/source/css/_variables/base.styl$font-family-chinese = "Songti TC", "Adobe Song Std"
引用自定义js文件和css样式
参考:
hexo引用自定义js文件和css样式
添加css/js文件到source文件夹之后修改:
/themes/next/layout/index.swig
Graphing Calculator
iOS-learning-process
- StanfordU CS193P Spring 2016
finished projects:
Graphing Calculator
Smashtag
Breakout
……
Menu Bar App:
https://www.raywenderlich.com/98178/os-x-tutorial-menus-popovers-menu-bar-apps
https://samoylov.tech/2016/09/14/handling-left-and-right-click-at-nsstatusbar-with-swift-3/
Pointing Hover Domain | Hexo-GithubPages-GoDaddy
Domain: example.com
Blog: build with Hexo, hosted on GithubPages (example.github.io)
create CNAME file uder the “source” directory (not the root dir)
within the CNAME file, write “http://example.com”
save it, generate (hexo g) and deploy (hexo d) to Github Pagesgo to GoDaddy DNS Manager of domain “example.com”
add new records:
• Hostname: @, Record Type: A, Value: 192.30.252.153
• Hostname: @, Record Type: A, Value: 192.30.252.154
• Hostname: www, Record Type: CNAME, Value: example.github.io
SlackBot source code
A simple slackbot script includes: greeting, randomly replying with lyrics
AWS | Error Establishing a Database Connection
“Error Establishing a Database Connection” – a common error with Wordpress blog deployed in AWS
Solution: log into the server and restart database
DONE!