Skip to content

Instantly share code, notes, and snippets.

View gists-app-test's full-sized avatar

gists-app-test

View GitHub Profile
@gists-app-test
gists-app-test / window_resize_mode
Created September 12, 2012 14:32 — forked from aharisu/window_resize_mode
Vim上のWindowサイズ変更をお手軽に
function g:window_resize_mode()
echo 'window resize mode'
while 1
let ch = getchar()
if ch == 104 " 104 = h
execute '2wincmd <'
elseif ch == 106 " 106 = j
execute "2wincmd -"
elseif ch == 107 " 107 = k
@gists-app-test
gists-app-test / gist:3707008
Created September 12, 2012 14:32 — forked from julianalucena/gist:3706606
Mocha setup
# Install nodejs
$ brew install nodejs
# Install npm
$ curl http://npmjs.org/install.sh | sh
# If it does not work, try it
$ curl https://npmjs.org/install.sh | sh
# Still does not work? Try it
@gists-app-test
gists-app-test / a_log_database.sql
Created September 12, 2012 14:32 — forked from wdalmut/a_log_database.sql
Just a Zend\Log\Logger on MySQL
CREATE DATABASE a_log_database;
USE a_log_database;
CREATE TABLE IF NOT EXISTS `log_table_name` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`priority` int(11) NOT NULL,
`priorityName` varchar(45) NOT NULL,
`message` varchar(255) NOT NULL,
@gists-app-test
gists-app-test / Foo.cs
Created September 12, 2012 14:32
Ninject MVC bind constructor arguments to HttpContext.Current.Session
public class Foo : IFoo
{
string _applicationName;
string _currentUserName;
public Foo(string applicationName, string currentUserName)
{
_applicationName = applicationName;
_currentUserName = currentUserName;
}
//
// UIImage+ImmediateLoading.h
// Code taken from https://gist.github.com/259357
//
#import <Foundation/Foundation.h>
@interface UIImage (UIImage_ImmediateLoading)
- (UIImage*) initImmediateLoadWithContentsOfFile:(NSString*)path;