Skip to content

Instantly share code, notes, and snippets.

Avatar

twinbird twinbird

View GitHub Profile
View lex_sample.l
/*
* Cプログラムの行数を数え,
* コメントを印字するプログラム
*/
/* ここから定義部 */
/* Cと同じ記法でここはコメントになります */
/* yaccと連携するためのmain関数を出力しないオプション */
View .vimrc
set nocompatible "vi互換モードoff
"------------------------------------------------
" Plugin設定
"------------------------------------------------
" vundle.vimを使う
set rtp+=~/.vim/bundle/Vundle.vim/
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
View go_build.sh
#!/bin/sh
if [ $# != 1 ]; then
echo "Usage: $0 [binary name]"
exit 0
fi
GOOS=linux GOARCH=amd64 go build -o ./bin/linux64/$1
GOOS=linux GOARCH=386 go build -o ./bin/linux386/$1
View .tmux.conf
# prefixはt
set -g prefix C-t
# 再描画間隔は1秒
set-option -g status-interval 1
# 右下は日付
set-option -g status-right "#[fg=black][%Y/%m/%d]"
# ペインのサイズ変更を若干vim風に
bind -r < resize-pane -L 5
bind -r - resize-pane -D 5
bind -r + resize-pane -U 5
@twinbird
twinbird / pearson.go
Created Feb 17, 2017
Pearson hashing sample by golang
View pearson.go
package main
import (
"bufio"
"fmt"
"os"
)
func main() {
sc := bufio.NewScanner(os.Stdin)
@twinbird
twinbird / gvimrc
Created Oct 31, 2017
windows用gvimrc
View gvimrc
"---------------------------------------------------------------------------
" Windows用gvimrc
"---------------------------------------------------------------------------
scriptencoding utf-8
"---------------------------------------------------------------------------
" カラー設定:
"---------------------------------------------------------------------------
colorscheme desert
@twinbird
twinbird / bootstrap.sh
Created Nov 2, 2017
vagrant initial script
View bootstrap.sh
#!/usr/bin/env bash
# vagrant provisioning shell script for my development environemt
# for ubuntu/trusty64
test -f /etc/bootstrapped && exit
# install development utility
sudo apt-get -y install gcc
sudo apt-get -y install make
View rails-env-boot.sh
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
sudo yum -y install vim git tmux tree gcc openssl-devel readline-devel sqlite-devel nodejs
sudo yum -y update
git config --global user.name 'twinbird'
git config --global user.email 'ixa2063@gmail.com'
git config --global core.editor 'vim'
curl -OL https://gist.githubusercontent.com/twinbird/040b298673e5c813a29962d3e5b858c6/raw/a983bbbbb5706e00a7ff08fe12b15323706591bb/.tmux.conf
curl -OL https://gist.githubusercontent.com/twinbird/adcec8abec12ad3398d0/raw/25a565fc75e0d868ab08f428cf86b80a625cf0b6/.vimrc
alias vi=vim >> ~/.bash_profile
@twinbird
twinbird / go-env-boot.sh
Created Mar 18, 2018
go development environment
View go-env-boot.sh
# system
sudo apt update
sudo apt install build-essential tree
# go
curl -OL https://dl.google.com/go/go1.10.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' >> .profile
# vim
View Microsoft.PowerShell_profile.ps1
# copy below to $HOME\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
$Host.PrivateData.DebugBackgroundColor = "DarkGray"
$Host.PrivateData.ErrorBackgroundColor = "DarkGray"
$tokenColors = @{
'Command' = 'White'
'Comment' = 'DarkGreen'
'Keyword' = 'Blue'
'Member' = 'Cyan'
You can’t perform that action at this time.