Skip to content

Instantly share code, notes, and snippets.

Avatar

Davide Cenzi link82

  • Crunchy Bytes
  • Italy
View GitHub Profile
@link82
link82 / es.sh
Last active Aug 29, 2015 — forked from rajraj/es.sh
View es.sh
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.i686 -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.4.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share
View gist:6365611
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardDidShow:) name:UIKeyboardDidShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillHide:) name:UIKeyboardWillHideNotification object:nil];
}
return self;
}
View backup.rb
require 'rubygems'
require 'active_record'
require 'yaml'
require 'logger'
require 'fileutils'
require 'aws/s3'
ROOT = File.expand_path(File.dirname(__FILE__))
CONFIG = YAML.load_file(File.join(ROOT, "config", "database.yml"))
TMP_BACKUP = File.join(ROOT, "tmp", "backup")
You can’t perform that action at this time.