Gistを積極的に使って行きたくなったので練習中。
snippet置き場とか覚書とかそんな感じで使って行きたい。
もし大きい文書になってきたらリポジトリとして独立させる、みたいなこともたぶんできるでしょう。
間違ったこと書いてててもforkする余地があるから安全、かな。
#!/usr/bin/env python | |
#vim: fileencoding=utf-8 | |
from __future__ import print_function, division, unicode_literals | |
import urllib2 | |
""" | |
Hooking git events to execute build on jenkins. | |
DON'T FORGET TO GIVE PERMISSION. | |
""" |
(function (global, $){ | |
var isScript = function (elem) { | |
return elem.hasOwnProperty("tagName") && elem.tagName.toUpperCase() === "SCRIPT"; | |
}; | |
var extractAsJson = function (line) { | |
var startStr = "var info ="; | |
var striped = line.strip(); | |
if (striped.startsWith(startStr)) { | |
var ret = striped.substr(startStr.length, striped.length - startStr.length - 1); | |
return ret.evalJSON(); |
(defun range (start size step) | |
(when (> size 0) | |
(cons start (range (+ start step) (1- size) step)))) |
#!/bin/sh | |
start `pth-norm $@` |
buildscript { | |
ext.kotlinVersion = '0.1-SNAPSHOT' | |
repositories { | |
mavenCentral() | |
maven { | |
url 'http://oss.sonatype.org/content/repositories/snapshots' | |
} | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"net" | |
"strconv" | |
) | |
const port = 3540 |