Skip to content

Instantly share code, notes, and snippets.

View manaten's full-sized avatar
🐢
I'm LAZY monster

manaten manaten

🐢
I'm LAZY monster
View GitHub Profile
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@febuiles
febuiles / hubot.sh
Created November 25, 2011 22:02
Hubot startup script
#!/bin/sh
# This assumes you have:
# 1) A user called `hubot` in charge of the bot.
# 2) A file called /home/hubot/.hubotrc that contains the Hubot credentials.
#
# To set the adapter either edit bin/hubot to specify what you want or append
# `-- -a campfire` to the $DAEMON variable below.
#
### BEGIN INIT INFO
@j5ik2o
j5ik2o / gist:1786414
Created February 10, 2012 04:00
git:masterからsvn:trunkに同期する方法
# 前提:クローンしたgitリポジトリに対してsvnリポジトリを設定して同期を行う。
# 設定ファイルを編集のが手間。
$ git clone ssh://localhsot/repos/app.git app
# .git/config にSVNのリポジトリの設定を追加する
[svn-remote "svn"]
url = http://junichi_kato@svn-server
fetch = project/app/trunk:refs/remotes/trunk
branches = project/app/branches/*:refs/remotes/*
@THemming
THemming / gist:2173037
Created March 23, 2012 17:31
init.d script to launch Play framework under CentOS/RedHat
#!/bin/bash
# chkconfig: 345 20 80
# description: Play start/shutdown script
# processname: play
#
# Instalation:
# copy file to /etc/init.d
# chmod +x /etc/init.d/play
# chkconfig --add /etc/init.d/play
# chkconfig play on
@scottjacobsen
scottjacobsen / git+clone+ssh+agent+forward+sudo
Created December 14, 2012 00:07
Git clone using ssh agent forwarding and sudo
SSH agent forwarding is great. It allows you to ssh from one server to
another all the while using the ssh-agent running on your local
workstation. The benefit is you don't need to generate ssh key pairs
on the servers you are connecting to in order to hop around.
When you ssh to a remote machine the remote machine talks to your
local ssh-agent through the socket referenced by the SSH_AUTH_SOCK
environment variable.
So you the remote server you can do something like:
@freeformz
freeformz / WhyILikeGo.md
Last active October 6, 2022 23:31
Why I Like Go

A slightly updated version of this doc is here on my website.

Why I Like Go

I visited with PagerDuty yesterday for a little Friday beer and pizza. While there I got started talking about Go. I was asked by Alex, their CEO, why I liked it. Several other people have asked me the same question recently, so I figured it was worth posting.

Goroutines

The first 1/2 of Go's concurrency story. Lightweight, concurrent function execution. You can spawn tons of these if needed and the Go runtime multiplexes them onto the configured number of CPUs/Threads as needed. They start with a super small stack that can grow (and shrink) via dynamic allocation (and freeing). They are as simple as go f(x), where f() is a function.

@chrisdarroch
chrisdarroch / idea
Created October 17, 2013 03:40
Open a project in IntelliJ IDEA from your command line!
#!/bin/sh
# check for where the latest version of IDEA is installed
IDEA=`ls -1d /Applications/IntelliJ\ * | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@twada
twada / gulpfile.js
Last active January 31, 2016 10:50
espower-coffee を使ってコード生成を経ずに (gulp-espower を使わずに) CoffeeScript + power-assert を使うデモ (npm test でも gulp test でも動きます)
var gulp = require('gulp');
var mocha = require('gulp-mocha');
gulp.task('test', function () {
require('espower-coffee/guess');
return gulp
.src('test/**/*.coffee')
.pipe(mocha());
});
@carlessanagustin
carlessanagustin / purge2.sh
Last active July 30, 2023 18:26
Script to reduce VM size before packaging for Vagrant v.2
#!/bin/sh
# Credits to:
# - http://vstone.eu/reducing-vagrant-box-size/
# - https://github.com/mitchellh/vagrant/issues/343
# - https://gist.github.com/adrienbrault/3775253
## for vagrant related tasks, uncomment vagrant comments
# vagrant: Unmount project
@cucmberium
cucmberium / gist:e687e88565b6a9ca7039
Last active February 28, 2024 01:23
Twitterの検索API & Twitterでの検索術

twitterの検索術 (search/tweetssearch/universal)

search/tweets では一週間以上前のツイートは検索できないので注意

search/universal は公式のConsumerKey/ConsumerSecretでないと使用できない

当方では一切の責任を負いません