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
// Simple Duck Typing in Go | |
package main | |
import "fmt" | |
type Animal interface { | |
sound() string | |
getName() string | |
} |
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
package main | |
import ( | |
"github.com/garyburd/redigo/redis" | |
"log" | |
"os" | |
"os/exec" | |
"sync" | |
) |
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
#! /usr/local/bin/ruby | |
require 'rubygems' | |
require 'redis' | |
require 'fileutils' | |
app_root = "/usr/local/camera_dashboard" | |
redis = Redis.new | |
cmds = [] | |
venue_list = redis.lrange("venues", 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
#! /usr/bin/env ruby | |
########################################################## | |
# Description - Check whether site is up or down via the | |
# command line. | |
# Author - www.edmoremoyo.com | |
# Dependency - phantomjs ( http://phantomjs.org/ ) | |
########################################################## | |
url = ARGV[0] |
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
#! /usr/bin/env ruby | |
########################################################## | |
# Description - Check whether site is up or down via the | |
# command line. | |
# Added feature - proxy access | |
# Author - www.edmoremoyo.com | |
########################################################## | |
require "net/http" |
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
#! /usr/bin/env ruby | |
########################################################## | |
# Description - Check whether site is up or down via the | |
# command line. | |
# Author - www.edmoremoyo.com | |
########################################################## | |
require "net/http" | |
require "uri" |
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
<html> | |
<head> | |
<title> Sound Loop </title> | |
<style> | |
#container{ font-size: 6em; float: left; } | |
#question{ | |
float: right; | |
border: 1px solid #000; | |
} | |
#question_header{ |
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
var sounds = [["How are you", "hi.mp3"], ["Who is this", "who.mp3"], ["How was school", "how.mp3"], ["What is this","what.mp3"], ["Who is this", "who.mp3"], ["1 + 2", "math.mp3"]], | |
presets = ["Who is this", "What is this"]; | |
function loop(){ | |
setTimeout(function(){ | |
var sound = sounds.splice( 0, 1 ), | |
clearDivContents = function( klasses ){ | |
console.log( klasses ); | |
for( var i=0; i < klasses.length; i+=1 ){ | |
$( klasses[i] ).children().detach(); |
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
class Object | |
def self.my_attr_accessor( *names ) | |
names.each do |name| | |
define_method( "#{name}=" ) do |value| | |
instance_variable_set( "@#{name}", value ) | |
end | |
define_method( name ) do | |
instance_variable_get( "@#{name}" ) | |
end | |
end |
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
git clone git://zsh.git.sf.net/gitroot/zsh/zsh | |
cd zsh | |
cat INSTALL | |
Follow the install instructions | |
Then its time for oh-my-zsh : | |
https://github.com/robbyrussell/oh-my-zsh | |
Follow the instructions for installation. |
NewerOlder