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
module MyModule | |
def my_method; 'hello' ; end | |
end | |
class MyClass | |
class << self | |
include MyModule | |
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
public abstract class AbstractJMClassFactory | |
{ | |
public abstract AbstractJMClass CreateHappyJM(); | |
public abstract AbstractJMClass CreateAngryJM(); | |
public abstract AbstractJMClass CreateHungryJM(); | |
} | |
public class ConcreteJMClassFactory: AbstractJMClassFactory { | |
public override AbstractJMClass CreateHappyJM() | |
{ |
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 | |
while (input = STDIN.read) != '' | |
rev_old, rev_new, ref = input.split(" ") | |
if ref == "refs/heads/master" | |
url="https://user:[email protected]/projects/build/project_name" | |
puts "Run CI build for project_name application" | |
`wget --no-check-certificate #{url} > /dev/null 2>&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
@@test = 20 | |
class A | |
@@a = 1 | |
def self.a | |
@@a | |
end | |
def hello | |
puts "hello from A" |
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
~/test > git init && touch hello && git add hello && git commit -m "add hello" && touch hello2 && git add hello2 && git commit -m "add hello2" && touch hello3 && git add hello3 && git commit -m "add hello3" && git checkout -b otherbranch && touch hello4 && git add hello4 && git commit -m "add hello4" && touch hello5 && git add hello5 && git commit -m "add hello5" | |
Initialized empty Git repository in /Users/jmeridth/test/.git/ | |
[master (root-commit) 58ec117] add hello | |
0 files changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 hello | |
[master c295b30] add hello2 | |
0 files changed, 0 insertions(+), 0 deletions(-) | |
create mode 100644 hello2 | |
[master 4d9730e] add hello3 | |
0 files changed, 0 insertions(+), 0 deletions(-) |
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
running install | |
running bdist_egg | |
running egg_info | |
creating gitosis.egg-info | |
writing requirements to gitosis.egg-info/requires.txt | |
writing gitosis.egg-info/PKG-INFO | |
writing top-level names to gitosis.egg-info/top_level.txt | |
writing dependency_links to gitosis.egg-info/dependency_links.txt | |
writing entry points to gitosis.egg-info/entry_points.txt | |
writing manifest file 'gitosis.egg-info/SOURCES.txt' |
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
case suggested_hobby.suggested_by | |
when "Joe Ocampo" | |
raise "Hobby requirement met with reading code, no others necessary" | |
when wife | |
try_once_to_appease_and_move_on | |
else | |
raise "No thanks" | |
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
set :user, "username_on_slice" | |
set :domain, "mydomain.com" | |
set :application, "my_app_name" | |
default_run_options[:pty] = true | |
set :repository, "[email protected]:my_app_name.git" | |
# If you aren't deploying to /u/apps/#{application} on the target | |
# servers (which is the default), you can specify the actual location | |
# via the :deploy_to variable: |
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
def num_of_one_bits(num): | |
total = 0 | |
bits = "" | |
while(num > 0): | |
bits += str(num&1) | |
total += num&1 | |
num>>=1 | |
return total,bits | |
number = input("Please give an integer: ") |
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
[user] | |
name = armmer | |
email = um...no | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow |