Skip to content

Instantly share code, notes, and snippets.

View milligramme's full-sized avatar

milligramme milligramme

View GitHub Profile
@yuroyoro
yuroyoro / development.js
Created February 15, 2017 02:16
webpakcer.gemにscssのビルドを加えて、大きめの依存ライブラリを別ファイルに分けて吐くようにしたwebpack.cnofig
// Note: You must restart bin/webpack-watcher for changes to take effect
var path = require('path')
var webpack = require('webpack')
var merge = require('webpack-merge')
var config = require('./shared.js')
var devconfig = {
devtool: 'sourcemap',
@jindrichmynarz
jindrichmynarz / dub_techno_in_sonic_pi.rb
Created December 8, 2015 19:11
Dub techno in Sonic Pi
use_debug false
use_bpm 130
# Our mixer!
master = (ramp *range(0, 1, 0.01))
kick_volume = 1
bass_volume = 1
revbass_volume = 1
snare_volume = 0.5
hats_volume = 0.5
@nobonobo
nobonobo / install.sh
Last active December 6, 2015 03:17
Goで子供向けピアノを作ってみた。iOS/Android/Desktopで動くよ!
go get -u golang.org/x/mobile/cmd/...
go get -u github.com/nobonobo/gomobileapp
gomobileapp init
go get -d github.com/nobonobo/nobopiano
# for iOS
gomobileapp build -target ios github.com/nobonobo/nobopiano
# 実機にnobopiano.appをインストール
# for Android
@joker1007
joker1007 / ginzarb_21.md
Last active April 14, 2021 06:41
Ginza.rb 21回の発表資料。rails_adminのつらみとオススメgem達。

rails_adminのつらみとオススメGemについて

rails_adminのつらみ

カスタマイズできるようで出来ない

レコード件数が一定以上になると使えない機能

  • ダッシュボード
  • 何も考えずに各モデルをカウントするのでレコード件数増えるとえらいことになる。
@tetsuharuohzeki
tetsuharuohzeki / memo.md
Last active October 26, 2015 03:24
https://github.com/Matt-Esch/virtual-dom のコードを読んだ時のメモ

revision

virtual-dom

  • 特に何も無い
  • 依存するモジュールの関数を引きずり出しているだけ
  • virtual-dom/hは例外で、与えた引数からVNodeを作る為のラッパー
@takezoe
takezoe / export-issues.js
Last active March 20, 2018 15:16
GitBucket Plug-in Example
var plugin = JavaScriptPlugin.define(
'export-issues', '1.0.0',
'Naoki Takezoe',
'https://twitter.com/takezoen',
'Export issues as JSON from REPO_URL/issues/export.'
);
plugin.addRepositoryAction('/issues/export', function(request, response, repository){
var issues = plugin.db().select("SELECT * FROM ISSUE WHERE "+
"USER_NAME ='" + repository.owner() + "' AND " +
@xavriley
xavriley / drum_tab_player.rb
Created June 10, 2014 21:22
Playing ASCII Drum Tabs with Sonic Pi
# Playing ASCII drum tabs with Sonic Pi
# Ruby is an awesome language for String manipulation.
# Lets use that fact to play some drums!
# Tab for the Amen break taken from Wikipedia
# http://en.wikipedia.org/wiki/Amen_break
# Note that %Q{ ... } is just another way
# to define a string in Ruby
# -*- coding: utf-8 -*-
# manage plugins for earthquake.gem
#
# forked from:
# https://gist.github.com/milligramme/5253047
#
# usage
# :manage_plugins show installed plugin
# :manage_plugins on <plugin_name> enable plugin
# :manage_plugins off <plugin_name> disable plugin
@nbqx
nbqx / index.js
Created February 12, 2014 06:28
koa + leveldbでgyazoみたいやつ
var fs = require('fs'),
crypto = require('crypto');
var through = require('through'),
base64 = require('base64-stream'),
mime = require('mime'),
koa = require('koa'),
router = require('koa-router'),
parse = require('co-busboy'),
level = require('level'),
@taea
taea / rm_pid.md
Last active January 12, 2023 14:22
postgres をちゃんと終了しないと.pidファイルが残っちゃって、Rails が起動しないもんだい

Rails 起動しようとするとこんなエラーでる

PG::ConnectionBad at /
could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432?