Skip to content

Instantly share code, notes, and snippets.

@karlseguin
karlseguin / gist:1876859
Created February 21, 2012 14:37
sublime text 2 script to save to remove server
#variation of http://urbangiraffe.com/2011/08/13/remote-editing-with-sublime-text-2/ that adds creating new folders remotely.
import sublime_plugin, os
class RemoteEdit(sublime_plugin.EventListener):
def on_post_save(self, view):
remote = { "/Users/leto/work/project": ["/usr/bin/scp", None, "user@server", "root_remote_path_like ~/project/", None] }
for dirname, target in remote.iteritems():
if view.file_name().startswith( dirname ):
@riaf
riaf / Cat.php
Created February 22, 2012 14:16
文学的PHP ref: http://qiita.com/items/2730
<?php
class Cat
{
protected $name;
public function getName()
{
return $this->name;
}
@yandod
yandod / nameko.js
Created March 5, 2012 13:18
無限もりよし サルベージ版
var isiPhone = !!navigator.userAgent.match(/[iPhone|iPad|iPod].*Mobile/);
/*
* --------------------------------------------------
* Const
* --------------------------------------------------
*/
var MESSAGE = "<div id='message'>無限もりよし</div><br><div id='namekoNum'>0本</div>";
@tomohiro
tomohiro / gist:2020862
Created March 12, 2012 09:20
GUNDAM (GitHub Ubuntu Node Dropbox AWS MongoDB) が生まれるまでの流れ
<Tomohiro> orz
<Tomohiro> うける
<gongo_tea> これはなんだろう。土下座してでも来てほしいのか
<gongo_tea> なんか残念なのか
<Tomohiro> 今の時代 LAMP/LAPP のスキルセット持ってても...
<Tomohiro> 的悲壮感ただよってる
<Tomohiro> Ruby/Node/NginX/Unicorn/MongoDB
<Tomohiro> あたりがナウい感じ出るのでは
<m_zuma> RNNUM
<gongo_tea> らんなむ
@hamaco
hamaco / vim_install.sh
Created March 27, 2012 18:38
Vim install
#!/bin/sh
./configure \
--prefix=$HOME/app/vim-7.3 \
--disable-darwin \
--disable-selinux \
--enable-fontset \
--enable-gnome-check \
--enable-gui=gtk2 \
--enable-multibyte \
@yalab
yalab / qrcode.html
Created June 6, 2012 04:01
QR Code Generator
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>QR Code Generator</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://raw.github.com/jeromeetienne/jquery-qrcode/master/jquery.qrcode.min.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(function($){
$("#button").on('click', function(){
@Gab-km
Gab-km / github-flow.ja.md
Last active April 23, 2025 04:19 — forked from juno/github-flow.ja.md
GitHub Flow (Japanese translation)
@sunato-a
sunato-a / gist:3775046
Created September 24, 2012 09:05
120630_hackathon#1(Public)

0. 環境


  • さくらVPS 512(Debian)
  • カーネル 2.6.32

1. Gitのセットアップ

手始めに、gitをいれます。

~$ sudo apt-get install git
@teppeis
teppeis / tenkaichi-git.md
Last active April 29, 2023 14:58
天下一gitconfig大会

天下一gitconfig大会(サイボウズ社内git勉強会@2012/11/20)の@teppeisの資料です。

ぎっとぎとにしてやんよ

DojoCat

  • gistでmarkdown書いたらbookmarkletでプレゼンになるよ。
@cjsaylor
cjsaylor / sample_class.php
Created November 22, 2012 14:36
Convenient PHPUnit mocking of Singleton Classes
<?php
class Sample {
public __construct() {
}
public function sayHello($name) {
return Someclass::getInstance()->hello($name);
}