Skip to content

Instantly share code, notes, and snippets.

View skahack's full-sized avatar
🐳
...

Hiroki Sato skahack

🐳
...
View GitHub Profile
@skahack
skahack / links.md
Last active August 29, 2015 13:56
The Sounds Of Evil (Anti​-​Injustice Volume 3) by Demonic Records
@skahack
skahack / Gruntfile.js
Last active August 29, 2015 14:01
node-webkit skeleton
module.exports = function(grunt) {
"use strict";
require('load-grunt-tasks')(grunt);
grunt.registerTask('build', [
'nodewebkit'
]);
grunt.initConfig({
nodewebkit: {
options: {
@skahack
skahack / gist:17fd66bf0d15dfa5d547
Created July 14, 2014 16:12
open a GitHub page
function! g:open_github() "{{{
let commit = system("git rev-parse HEAD")
let commit = substitute(commit, '^[ \t\n]\+', '', 'g')
let commit = substitute(commit, '[ \t\n]\+$', '', 'g')
let top = system('git rev-parse --show-toplevel')
let top = substitute(top, '^[ \t\n]\+', '', 'g')
let top = substitute(top, '[ \t\n]\+$', '', 'g')
let filepath = expand('%:p')
@skahack
skahack / opam.patch
Last active August 29, 2015 14:12
opam.patch
diff --git a/src/core/opamSystem.ml b/src/core/opamSystem.ml
index be23953..c5985a7 100644
--- a/src/core/opamSystem.ml
+++ b/src/core/opamSystem.ml
@@ -676,7 +676,7 @@ let download_command =
let curl command ~compress dir src =
let curl_args = [
"--write-out"; "%{http_code}\\n"; "--insecure";
- "--retry"; retry; "--retry-delay"; "2";
+ "--retry"; retry; "--retry-delay"; "2"; "-4";
@skahack
skahack / .flowconfig
Last active August 29, 2015 14:12
facebook/flow
[ignore]
[include]
[libs]
[options]
@skahack
skahack / a.java
Created January 20, 2015 10:35
Java
// aiueo
@skahack
skahack / elevator.js
Created January 27, 2015 18:53
elevator-saga-solution
{
elevators: null,
floors: null,
init: function(elevators, floors) {
this.elevators = elevators;
this.floors = floors;
var self = this;
elevators.forEach(function(v){
@skahack
skahack / screenshot.js
Created February 19, 2015 07:15
Screenshot
var fs = require('fs');
var screenshot = require('atom-screenshot');
var url = require('url');
var path = require('path');
var async = require('async');
var args = [];
for (var i = 2; i < process.argv.length; i++) {
args.push([i - 2, process.argv[i]]);
}
@skahack
skahack / miyamae.js
Created February 24, 2015 13:53
ごみ
var fs = require('fs');
var format = require('json-nice');
var xray = require('x-ray');
var src = 'http://www.city.kawasaki.jp/kurashi/category/24-1-11-3-5-0-0-0-0-0.html';
xray(src)
.select([{
$root: '.mol_tableblock',
"title": "table[summary]",
list: [{

reactBridgeDidFinishTransaction

- (void)reactBridgeDidFinishTransaction

ReactがViewの計算をすべて終えたタイミングで実行される。TODO: Deprecate thisと宣言部分にあるので、廃止されるかもしれない。