This file contains 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
var now = new Date(); | |
var currMonth = now.getMonth(); | |
var currYear = now.getFullYear(); | |
var date = now.getDate(); | |
var weekDay = new Array(7); | |
weekDay[0] = "Sun"; | |
weekDay[1] = "Mon"; | |
weekDay[2] = "Tue"; |
This file contains 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
namespace :sp do | |
authors = %w/Magesh Bala Vikram Abraham Imran Satish Harish Varun Jayamohan Ramesh Raghuvamsan Yogesh Yuvaraja Ranjith Kavitha Safia Surya Priya Shalini Priyanka/ | |
publishers = ["Tamil Nadu TextBook Corporation"] | |
al = authors.length | |
pl = publishers.length | |
task :textbooks => :environment do | |
TextBook.delete_all |
This file contains 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
#!/usr/bin/env ruby | |
## WP2TUMBLR: WordPress 2 Tumblr Importing tool | |
## | |
## Usage: wp2tumblr [OPTION] WORDPRESS_XML_FILE | |
## | |
## Import the WORDPRESS_XML_FILE to a Tumblr blog. | |
## Provide `--group` option to publish to a group. | |
## This could take a long time... | |
## | |
## To install, download the script and chmod to 755. |
This file contains 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
require 'rubygems' | |
require 'net/http' | |
require 'nokogiri' | |
TUMBLR_USER = 'your@email.com' | |
TUMBLR_PASS = 'yourpassword' | |
url = URI.parse('http://www.tumblr.com/api/write') | |
# Read the WP export file |
This file contains 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
;; Interactively Do Things (highly recommended, but not strictly required) | |
;; (require 'ido) | |
;; (ido-mode t) | |
;; Rinari | |
(add-to-list 'load-path "/etc/emacs/site-start.d/rinari") | |
(require 'rinari) | |
;; Emacs Titanium mode | |
; (add-to-list 'load-path "/etc/emacs/site-start.d/emacs-titanium") |
This file contains 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
#!/bin/bash | |
if [[ ! -n $1 ]]; then | |
echo "Please insert a project name" | |
exit 1 | |
fi | |
# Mysql Config | |
MYSQL_USER="" |
This file contains 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
server { | |
listen 80; | |
server_name sub.domain.com; | |
root /path/to/garden; | |
index index.php index.html; | |
location / { | |
if (-f $request_filename) { | |
break; |
This file contains 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 fetchParams(link){ | |
var vars = [], hash; | |
var hashes = link.slice(link.indexOf('?') + 1).split('&'); | |
for(var i = 0; i < hashes.length; i++) | |
{ | |
hash = hashes[i].split('='); | |
vars.push(hash[0]); | |
vars[hash[0]] = hash[1]; | |
} | |
return vars; |
This file contains 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
@low_channel = 1 # lowest channel | |
@high_channel = 10 # highest channel | |
@blocked = [2, 6, 8] # blocked channels | |
@channels_to_visit = [9,1,2,3,9] #channels to watch | |
flash = 0 | |
click1 = 0 | |
click2 = 0 | |
click3 = 0 | |
click4 = 0 |
This file contains 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
namespace :heroku do | |
def app_name | |
@app_name ||= Heroku::Command::BaseWithApp.new([]).app | |
end | |
def latest_bundle(timeout = 30) | |
puts "Attempting to get latest bundle..." | |
get_bundle = lambda do | |
bundles = Heroku::Command.run('bundles', {}) | |
bundles.sort { |b1, b2| b1[:created_at] <=> b2[:created_at] } |
OlderNewer