Skip to content

Instantly share code, notes, and snippets.

g: https://www.google.com/search?q=%s Google
wiki: https://www.wikipedia.org/w/index.php?title=Special:Search&search=%s Wikipedia
youtube: https://www.youtube.com/results?search_query=%s Youtube
twitter: https://twitter.com/search?q=%s Twitter
reddit: https://www.reddit.com/search?q=%s reddit
hackernews: https://hn.algolia.com/?query=%s HackerNews
github: https://github.com/search?q=%s GitHub
qiita: https://qiita.com/search?q=%s Qiita
stack: https://stackoverflow.com/search?q=%s Stack Overflow
#!/bin/sh
# sh build.sh ${target}
set -eu
if [ $# -eq 0 ]; then
echo "target none, exit"
exit 1
fi
@ryochack
ryochack / .profile
Last active November 18, 2017 01:06
export SELFBUILD=$HOME/code/build
export PATH=$HOME/local/bin:$PATH
# go
export GOROOT=$HOME/code/build/go
export GOPATH=$HOME/.gopath
export PATH=$SELFBUILD/go/bin:$PATH
export PATH=$GOPATH/bin:$PATH
# rust
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
#!/bin/bash
# https://wiki.archlinuxjp.org/index.php/Xrandr#.E3.82.B9.E3.82.AF.E3.83.AA.E3.83.97.E3.83.88
MAIN="LVDS-1"
VGA="VGA-1"
DP="HDMI-1"
VGA_DETECTED=false
DP_DETECTED=false
#!/bin/bash
# https://wiki.archlinuxjp.org/index.php/Xrandr#.E3.82.B9.E3.82.AF.E3.83.AA.E3.83.97.E3.83.88
MAIN="LVDS-1"
EXT="VGA-1"
if (xrandr | grep -q "$EXT disconnected"); then
xrandr --output $MAIN --auto --output $EXT --off
else
advanced_slice_patterns
allow
allow_internal_unstable
asm
associated_consts
box_patterns
box_syntax
braced_empty_structs
cfg
cfg_attr
AsMut
AsRef
Box
Clone
Copy
Debug
Default
DoubleEndedIterator
Drop
Eq
" vim-plugでPluginがインストールされているかどうかを判定する
function s:has_plugged(name)
if exists('g:plugs') && has_key(g:plugs, a:name) && isdirectory(g:plugs[a:name].dir)
return 1
else
return 0
endif
endfunction
/**
* continuous dump from binary stream
* $ tail -f xxx | xstream
*/
#include <stdio.h>
#include <stdint.h>
void xstreamer(FILE *fdin, FILE *fdout) {
int col = 0;