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
# ----- Following library will be needed ------ | |
# gem install nokogiri | |
require 'nokogiri' | |
require 'open-uri' | |
class Twitter | |
def initialize(tweet_account) | |
@url = 'https://twitter.com/' + tweet_account |
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
sudo apt-get install memcached | |
ps aux | grep memcached | grep 11211 | |
### response should be | |
### memcache 10197 0.0 0.0 51600 4252 ? Sl 15:17 0:00 /usr/bin/memcached -m 64 -p 11211 -u memcache -l 127.0.0.1 |
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 Java | |
cd ~ | |
sudo apt-get update | |
sudo apt-get install openjdk-7-jre-headless -y | |
### Download and Install ElasticSearch | |
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below | |
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.3.1.deb | |
sudo dpkg -i elasticsearch-1.3.1.deb | |
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( $ ){ | |
"use strict" | |
$.fn.transition = function ( response_target ) { | |
var anchor = this.get(0) | |
history.pushState({ path: anchor.path }, '', anchor.href) | |
$.get(anchor.href, function(data) { | |
$(response_target).slideTo(data) | |
}) | |
return false |
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
# | |
# Recurring Job using Delayed::Job | |
# | |
# Setup Your job the "plain-old" DJ (perform) way, include this module | |
# and Your handler will re-schedule itself every time it succeeds. | |
# | |
# Sample : | |
# | |
# class MyJob | |
# include Delayed::ScheduledJob |