brew install fish
sudo vi /etc/shells # 末尾に /usr/local/bin/fish を追加
chsh -s /usr/local/bin/fish
package text2ogp | |
import ( | |
"bytes" | |
"github.com/golang/freetype" | |
"github.com/golang/freetype/truetype" | |
"golang.org/x/image/font" | |
"golang.org/x/image/math/fixed" | |
"image" | |
"image/color" |
from itertools import chain | |
from collections import Counter | |
import MeCab | |
flatten = lambda array: list(chain.from_iterable(array)) | |
strip = lambda text: text.lstrip().rstrip() | |
""" | |
USAGE |
- Install | |
``` | |
wget https://dl.eff.org/certbot-auto | |
chmod a+x ./certbot-auto | |
./certbot-auto certonly --webroot -w {webroot} --agree-tos --email {email} -d {domain} | |
``` | |
- crontabへの登録 |
func scrollViewDidScroll(scrollView: UIScrollView) { | |
if self.tableView.contentOffset.y >= (self.tableView.contentSize.height - self.tableView.bounds.size.height) { | |
} else { | |
} | |
} |
self.navigationController!.navigationBar.translucent = false | |
for parent in self.navigationController!.navigationBar.subviews { | |
for childView in parent.subviews { | |
childView.removeFromSuperview() | |
} | |
} | |
// 特定のViewを取り除かない場合。特定のViewのtagに999などの値を設定しておく | |
self.navigationController!.navigationBar.translucent = false | |
for parent in self.navigationController!.navigationBar.subviews { |
let anotherStoryboard = UIStoryboard(name: "Another", bundle: nil) | |
let vc = anotherStoryboard.instantiateViewControllerWithIdentifier("AnotherViewController") as! AnotherViewController |
import Social | |
var twAccount: ACAccount? | |
let accountType = ACAccountStore().accountTypeWithAccountTypeIdentifier(ACAccountTypeIdentifierTwitter) | |
let accountStore = ACAccountStore() | |
accountStore.requestAccessToAccountsWithType(accountType, options: nil) { (granted:Bool, error:NSError?) -> Void in | |
if error != nil { | |
// エラー処理 | |
print("error! \(error)") | |
return | |
} |
View controller-based status bar appearanceをNOに設定 | |
UIApplication.sharedApplication().setStatusBarStyle(.LightContent, animated: true) |