- Download SIMBL
- Install SIMBL
- Download Compulsion
- Open Compulsion.xcodeproj
- ⌘B to Build
- Done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(!window.jQuery){!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k="".trim,l={},m="1.11.0",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,argum |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Git branch in prompt. | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
| #export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | |
| export PS1="\[\033[36m\]\u\[\033[m\] @ \[\033[31m\]\h:\[\033[33m\]\w\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| invisible |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def send_line(message): | |
| data = { | |
| "to": ["YOUR-LINE-USER-ID"], | |
| "toChannel": 1383378250, | |
| "eventType": "138311608800106203", | |
| "content": { | |
| "contentType": 1, | |
| "toType": 1, | |
| "text": message | |
| } |
I'm going to walk you through the steps for setting up a AWS Lambda to talk to the internet and a VPC. Let's dive in.
So it might be really unintuitive at first but lambda functions have three states.
- No VPC, where it can talk openly to the web, but can't talk to any of your AWS services.
- VPC, the default setting where the lambda function can talk to your AWS services but can't talk to the web.
- VPC with NAT, The best of both worlds, AWS services and web.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Your Stylesheet | |
| * | |
| * This stylesheet is loaded when Atom starts up and is reloaded automatically | |
| * when it is changed and saved. | |
| * | |
| * Add your own CSS or Less to fully customize Atom. | |
| * If you are unfamiliar with Less, you can read more about it here: | |
| * http://lesscss.org | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| window.i18n = window.i18n || {}; | |
| i18n._langCache = {} | |
| i18n._availableLangs = [ | |
| 'en', | |
| 'zh-TW', | |
| 'ja' | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import time | |
| endpoint = 'http://mis.twse.com.tw/stock/api/getStockInfo.jsp' | |
| targets = ['0050'] | |
| timestamp = int(time.time() * 1000 + 1000000) | |
| channels = '|'.join('tse_{}.tw'.format(target) for target in targets) | |
| query_url = '{}?_={}&ex_ch={}'.format(endpoint, timestamp, channels) | |
| req = requests.session() | |
| req.get('http://mis.twse.com.tw/stock/index.jsp') | |
| print(query_url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class KMP: | |
| def partial(self, pattern): | |
| """ Calculate partial match table: String -> [Int]""" | |
| ret = [0] | |
| for i in range(1, len(pattern)): | |
| j = ret[i - 1] | |
| while j > 0 and pattern[j] != pattern[i]: | |
| j = ret[j - 1] | |
| ret.append(j + 1 if pattern[j] == pattern[i] else j) |
OlderNewer