Skip to content

Instantly share code, notes, and snippets.

Avatar
🕘
JST +09:00

Yoshiaki Sugimoto ysugimoto

🕘
JST +09:00
View GitHub Profile
@daliborgogic
daliborgogic / Dockerfile
Last active Dec 17, 2018
Navigation Timing, Headless Chrome, Docker
View Dockerfile
FROM node:8.7.0-slim
RUN apt-get update && \
apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
RUN npm i puppeteer micro qs
@sdorra
sdorra / keys.go
Created Apr 17, 2016
Golang RSA Key Generation
View keys.go
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@uupaa
uupaa / typical.javascript.module.md
Last active Dec 20, 2015
The typical javascript module pattern
View typical.javascript.module.md
@subak
subak / gist:5144191
Last active Dec 14, 2015
Stateful Nite 第4夜
View gist:5144191

jQuery.Deferred#pipe

非同期処理を直列に実行するときに、直前の実行結果が次の非同期処理の初期条件になるような場合に使います。

// 2 * 5 = 10
var filter = function ( x ) {
  return x * 5;
}
var callback = function ( result ) {
@drewolson
drewolson / reflection.go
Last active Jun 19, 2021
Golang Reflection Example
View reflection.go
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`
@letsspeak
letsspeak / database.yml
Created Oct 30, 2012
Redmine on unicorn on nginx with mysql, my configuration files.
View database.yml
# Default setup is given for MySQL with ruby1.8. If you're running Redmine
# with MySQL and ruby1.9, replace the adapter name with `mysql2`.
# Examples for PostgreSQL and SQLite3 can be found at the end.
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: ******
@MoOx
MoOx / less2stylus.js
Created Aug 27, 2012 — forked from lancejpollard/less2stylus.coffee
Convert LESS to Stylus
View less2stylus.js
// Usage : less2stylusDir('../src/css/');
var fs = require('fs');
// this less 2 stylus conversion script make a stylus easy to read syntax
// - let the braces
// - replace the @ for var as $
// - let semicolons
function less2stylus(less)
@bjnsn
bjnsn / EncodePath.js
Created Aug 23, 2012
Encode a path into compact EaselJS format using EaselJS/Canvas path commands
View EncodePath.js
/**
* The reverse of the EaselJS Graphics.decode method for
* compactly encoding paths.
*
* @author Brett Johnson, periscopic.com
*
* @example
* var ep = new EncodePath();
* ep.moveTo(-150, 0).lineTo(150, 0);
* var shp = new Shape();
@yuya-matsushima
yuya-matsushima / .e2esound.vim
Created Jun 16, 2012
とりあえずこれだけあれば…的な
View .e2esound.vim
" e2esound color scheme based on ir_black
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "e2esound"
@hiboma
hiboma / nginx.conf
Created Jan 24, 2012
Nginx+Lua+Redis で動的upstream
View nginx.conf
worker_processes 1;
error_log /dev/stderr debug;
events {
worker_connections 256;
}
http {
server {