This file contains 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
#!/usr/bin/env python | |
import os | |
import commands | |
# logging config | |
from logging import getLogger,StreamHandler,Formatter,DEBUG | |
logger = getLogger(__name__) | |
handler = StreamHandler() | |
handler.setLevel(DEBUG) | |
handler.setFormatter(Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')) |
This file contains 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
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
println("AccountsViewController#tableView cellForRowAtIndexPath called.") | |
let cell: UITableViewCell = UITableViewCell(style: UITableViewCellStyle.Default, reuseIdentifier: "Cell") | |
// ユーザIDを表示する | |
cell.textLabel?.text = accounts[indexPath.row].username | |
// プロフィール画像を取得して非同期で表示させる | |
var q_global: dispatch_queue_t = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | |
var q_main: dispatch_queue_t = dispatch_get_main_queue(); | |
cell.imageView?.image = nil; | |
dispatch_async(q_global, { |
This file contains 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
var today = new Date(); | |
new Date(today.getFullYear(), today.getMonth() + 1, 0); | |
// error | |
dt.setFullYear(today.getFullYear()); | |
dt.setMonth(today.getMonth()+1); | |
dt.setDate(0); | |
dt.getDate(); |
This file contains 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
// for GitHub webhook | |
router.all('/webhook', function(req, res) { | |
var cmd = exec("git pull", { | |
cwd: conf.deploy.dir | |
}, function(error, stdout, stderr) { | |
if (error) { | |
debug("> ERROR (error): " + error); | |
} | |
if (stderr && error) { | |
debug("> ERROR (error): " + error); |
This file contains 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
docker pull sameersbn/gitlab:latest | |
docker run --name='gitlab' -it --rm -p 10022:22 -p 10080:80 -e 'GITLAB_PORT=10080' -e 'GITLAB_SSH_PORT=10022' sameersbn/gitlab:latest |
This file contains 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
# ubuntu 14.04 for Gitlab | |
FROM ubuntu:14.04 | |
MAINTAINER hogehoge | |
RUN apt-get update | |
RUN apt-get -y install wget zip gcc openssh-server postfix | |
RUN wget https://downloads-packages.s3.amazonaws.com/ubuntu-14.04/gitlab_7.1.1-omnibus-1_amd64.deb | |
RUN dpkg -i gitlab_7.1.1-omnibus-1_amd64.deb |
NewerOlder