group :development, :test do
gem 'guard'
gem 'guard-livereload', '~> 2.5', require: false
gem 'rack-livereload'
end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configure使うと wide charcterの設定自動でしてくれて便利だった | |
sudo apt install ncurses5-dev | |
sudo apt install ncursesw5-dev | |
cd /usr/local/src | |
sudo git clone https://github.com/jonas/tig.git | |
cd tig | |
sudo git checkout refs/tags/tig-2.2.1 | |
sudo ./autogen.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ページ読み込みが完了した時に実行 | |
document.addEventListener("DOMContentLoaded", e => { | |
console.log('fired ->', e.type, e.timeStamp) | |
// turbolinksを有効にしている時 | |
document.addEventListener('turbolinks:load', (evt)=>{ | |
console.log('will render ->', evt.type, evt.timeStamp) | |
let elm = document.getElementById('padapp') | |
if (!elm) { return ; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#config/boot.rb | |
# ~ | |
require 'rails/commands/server' | |
module DefaultOptions | |
def default_options | |
super.merge!(Host:'0.0.0.0', Port: 3000) | |
end | |
end | |
Rails::Server.send(:prepend, DefaultOptions) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get download samba | |
dpkg-deb -x samba*.deb extract_here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -u $(id -u):$(id -g) -v $(pwd):/srv --entrypoint /bin/cp svendowideit/samba -r /usr/share/doc/samba/examples/LDAP /srv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### | |
# debian jessie on vagrant/VM | |
# sudoedit /etc/systemd/system/create-ssh-host-keys.service | |
# CHECK: | |
# systemctl list-unit-files --type=service | grep create | |
# ENABLE: | |
# systemctl enable create-ssh-host-keys | |
# systemctl start create-ssh-host-keys | |
[Unit] | |
Description=Create SSH host keys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# names of latest versions of each package | |
export NGINX_VERSION=1.9.12 | |
export VERSION_PCRE=pcre-8.38 | |
export VERSION_LIBRESSL=libressl-2.3.2 | |
export VERSION_NGINX=nginx-$NGINX_VERSION | |
#export NPS_VERSION=1.9.32.10 | |
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMMAND=echo | |
#COMMAND=curl | |
echo MESSAGE=あいうえお&submit=書き込む | iconv -t euc-jp > data.message | |
$COMMAND -v -d 'DIR=game' -d 'BBS=12345' -d 'KEY=1234567890' \? | |
-d "TIME=$(date +%s)" -d 'NAME="" \ | |
-d "MAIL=sage" -d @data.message \ | |
-e http://jbbs.shitaraba.net/bbs/read.cgi/game/12345/1234567890/ \ | |
http://jbbs.shitaraba.net/bbs/write.cgi/game/12345/1234567890/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "fiddle/import" | |
require 'fiddle/types' | |
# オリジナル(Win32APIライブラリを使う版)はこちら | |
# https://rubyist.g.hatena.ne.jp/edvakf/20110405/1301973681 | |
module WIN32API | |
extend Fiddle::Importer | |
dlload 'C:\\Windows\\System32\\kernel32.dll' | |
include Fiddle::Win32Types | |
extern 'DWORD GetCurrentProcessId()' |