Skip to content

Instantly share code, notes, and snippets.

View mmisono's full-sized avatar
🌀

Masanori Misono mmisono

🌀
View GitHub Profile
snippet perl
#!/opt/local/bin/perl
use strict;
use warnings;
${1}
snippet sub
sub ${1:function_name} {
snippet allow
AllowOverride ${1:AuthConfig} ${2:FileInfo} ${3:Indexes} ${4:Limit} ${5:Options}
snippet opt
Options ${1:All} ${2:ExecCGI} ${3:FollowSymLinks} ${4:Includes} ${5:IncludesNOEXEC} ${6:Indexes} ${7:MultiViews} ${8:SymLinksIfOwnerMatch}
snippet vhost
<VirtualHost ${1:example.org}>
snippet ec
#endinitclip
snippet inc
#include "${1}"
snippet br
break;
snippet script
script ${1:new_object}
on run
${2:-- do something interesting}
end run
end script
snippet on
on ${1:functionName}(${2:arguments})
snippet pu
public
snippet po
protected
snippet pr
private
snippet :f
${1:method_name}: function(${2:attribute}){
${0}
}
snippet func
function ${1:function_name} (${2:argument}) {
${0:// body...}
}
# -*- coding: utf-8 -*-
# タイムライン取得後に線を入れる
Termtter::Client.register_hook(
:name => :add_line,
:points => [:output],
:exec_proc => lambda {
puts '-' * `echo $COLUMNS`.to_i
}
)
#!/bin/sh
tmpfile=~/.screen/termtter
if [ -e $tmpfile ] ; then
screen -X eval 'resize 10' 'focus up'
rm $tmpfile
else
screen -X eval 'focus bottom' 'resize max'
touch $tmpfile
snippet sel
@selector(${1:method}:)
snippet imp
#import <${1:Cocoa/Cocoa.h}>
snippet Imp
#import "${1}}"
snippet if
if [ ${1:condition} ]; then
${0:#statements}
fi
snippet el
else
${0:#statements}