Skip to content

Instantly share code, notes, and snippets.

View ysugimoto's full-sized avatar
🕘
GMT+9 JST

Yoshiaki Sugimoto ysugimoto

🕘
GMT+9 JST
View GitHub Profile
#!/usr/bin/env -S deno run -A
/*
$ edit ~/bin/cmd
$ chmod +x ~/bin/cmd
$ cmd -f
# Run
$ ls -al
total 24
drwxr-xr-x 10 kotaro.chikuba staff 320 Sep 22 20:16 .
drwxr-xr-x 9 kotaro.chikuba staff 288 Sep 22 20:01 .git
@daliborgogic
daliborgogic / Dockerfile
Last active December 17, 2018 16:19
Navigation Timing, Headless Chrome, Docker
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 April 17, 2016 19:31
Golang RSA Key Generation
/*
* Genarate rsa keys.
*/
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
@uupaa
uupaa / typical.javascript.module.md
Last active December 20, 2015 13:19
The typical javascript module pattern
@subak
subak / gist:5144191
Last active December 14, 2015 20:29
Stateful Nite 第4夜

jQuery.Deferred#pipe

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

// 2 * 5 = 10
var filter = function ( x ) {
  return x * 5;
}
var callback = function ( result ) {
@drewolson
drewolson / reflection.go
Last active November 20, 2023 09:39
Golang Reflection Example
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 October 30, 2012 17:41
Redmine on unicorn on nginx with mysql, my configuration files.
# 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 August 27, 2012 17:37 — forked from lancejpollard/less2stylus.coffee
Convert LESS to Stylus
// 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 August 23, 2012 19:03
Encode a path into compact EaselJS format using EaselJS/Canvas path commands
/**
* 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 June 16, 2012 05:31
とりあえずこれだけあれば…的な
" e2esound color scheme based on ir_black
set background=dark
hi clear
if exists("syntax_on")
syntax reset
endif
let g:colors_name = "e2esound"