This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Foo : IFoo | |
{ | |
string _applicationName; | |
string _currentUserName; | |
public Foo(string applicationName, string currentUserName) | |
{ | |
_applicationName = applicationName; | |
_currentUserName = currentUserName; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// UIImage+ImmediateLoading.h | |
// Code taken from https://gist.github.com/259357 | |
// | |
#import <Foundation/Foundation.h> | |
@interface UIImage (UIImage_ImmediateLoading) | |
- (UIImage*) initImmediateLoadWithContentsOfFile:(NSString*)path; |
OlderNewer