Created
September 14, 2013 19:50
-
-
Save jonmarkgo/6565059 to your computer and use it in GitHub Desktop.
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 askNicely = fuction(person, mm) { | |
| if (person == mm) { | |
| console.log('The real one') | |
| } | |
| } |
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 blurred(args): | |
| for _ in range(len(args)): | |
| print 'Hey, Hey, Hey' | |
| return | |
| def get_up(): | |
| return blurred(['|', '|', '|']) |
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 make(it): | |
| print it | |
| def chorus(): | |
| try: | |
| make('you and i') | |
| except: | |
| pass |
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 Come_On(object): | |
| def go_there(place): | |
| try: | |
| question = higher(me) | |
| if question is True: | |
| place = 'blind_see' if blind_men else golden_streets | |
| except: | |
| 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
| def wish(they): | |
| if they['run'] is True: | |
| if they['walk'] is True: | |
| if they['in_sun'] == datetime.timedelta(days=1): | |
| return True | |
| else: | |
| 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
| for i in range(1, 17): | |
| the_word = 'Bird' | |
| if i % 4 == 0: | |
| print "%s is the word." % the_word | |
| else: | |
| print "%s" % the_word |
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 party(): | |
| print "PARTY" | |
| return party() |
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 Me { | |
| public function crash($splashes) { | |
| $this->blown_to_hell = array_pop($splashes); | |
| return $this; | |
| } | |
| } |
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
| $house = new House(); | |
| $ball = new Ball(); | |
| $ball->destroy($house); |
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 Party { | |
| public function run() { | |
| if (true) | |
| $this->run(); | |
| } | |
| public function start() { | |
| $this->run(); | |
| } | |
| } | |
| $party = new Party(); | |
| $party->start(); |
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 Animal { | |
| protected $sound = ""; | |
| public function say() { | |
| return $this->sound; | |
| } | |
| } | |
| class Dog extends Animal { | |
| protected $sound = "Woof"; | |
| } | |
| class Cat extends Animal { | |
| protected $sound = "Meow"; | |
| } | |
| class Bird extends Animal { | |
| protected $sound = "Tweet"; | |
| } | |
| class Mouse extends Animal { | |
| protected $sound = "Squeak"; | |
| } | |
| class Cow extends Animal { | |
| protected $sound = "Moo"; | |
| } | |
| class Frog extends Animal { | |
| protected $sound = "Frog"; | |
| } | |
| class Elephant extends Animal { | |
| protected $sound = "Toot"; | |
| } | |
| class Duck extends Animal { | |
| protected $sound = "Quack"; | |
| } | |
| class Fish extends Animal { | |
| protected $sound = "Blub"; | |
| } | |
| class Seal extends Animal { | |
| protected $sound = "Ow Ow Ow"; | |
| } | |
| $fox = new Fox(); | |
| $fox->say(); |
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() { | |
| var someLadies = ['Erica, Jessica, Mary, Sandra']; | |
| for(var i=0; i<someLadies.length; i++){ | |
| var lady = valueArray[i]; | |
| var alotABit = lady.length; | |
| var doingItRight = alotABit/2; | |
| return lady.substring(0, doingItRight); | |
| } | |
| } |
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 | |
| func main() { | |
| for _, child := range children { | |
| if child.british != true { | |
| washington.Save(child) | |
| } | |
| } | |
| } |
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
| for ($i = 1; $i < 100; $i++) { | |
| if ($i == 64 && $needMe && $feedMe) { | |
| return true; | |
| } | |
| } |
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
| if ($realLife || $fantasy) { | |
| for ($i = 0; $i < $landslide + 1; $i++) { | |
| if (!$reality) { | |
| break; | |
| } | |
| $landslide = $i + 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
| int[] line = {1, 2, 3, 4, 5} | |
| for ( int i : line) { | |
| System.out.println(i); | |
| } |
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 person = new Person(); | |
| person.setGender = 'male'; | |
| person.setName = 'Sue'; |
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
| Dim miles As Integer = 0 | |
| location = 'home' | |
| Do | |
| If miles < 500 Then | |
| Continue While | |
| End If | |
| If miles >= 1000 Then | |
| location = 'your door' | |
| End If | |
| Debug.Write("BA DA DA DA") | |
| index += 1 | |
| Loop Until location == 'your door' |
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
| - (id)init | |
| { | |
| self = [super init]; | |
| if (self) { | |
| [self thankGod]; | |
| [[self today] kindaOdd:YES]; | |
| [[self dog] barking:NO]; | |
| [[self today] smog:NO]; | |
| [[self mama] cooksBreakfast:YES withHog:NO]; | |
| } | |
| return self; | |
| } |
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
| Me.prototype.matters = function(you) { | |
| if (you.color === ‘#000’ || you.color === ‘#FFF’) | |
| return you.thinkingAbout(this.baby); | |
| }; |
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
| get ‘/satisfaction’ do | |
| status 404 | |
| 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
| function() { | |
| sunrise = 21600000; | |
| function up(i) { | |
| i++; | |
| } | |
| for(var night=0; night<sunrise; up(night);){ | |
| get some(i) { | |
| return true; | |
| } | |
| } | |
| } |
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 can = { | |
| fake: false, | |
| type: 'plastic', | |
| holds: 'water', | |
| origin: null | |
| } | |
| var plant = { | |
| fake: true, | |
| type: 'rubber', | |
| holds: null, | |
| origin: 'china' | |
| } |
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
| new String("love").equals("love") ==> true |
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
| String[] mySituation = {'clowns','me & you','jokers'}; |
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 static void doYouKnow(String[] it) { | |
| try { | |
| it == 'I Love You'; | |
| return True | |
| } catch (it) { | |
| return doYouKNow('I Love You'); | |
| } | |
| } |
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
| from functools import wraps | |
| class ExclusiveSong(object): | |
| def reverse(things): | |
| return things[::-1] | |
| def flip(func): | |
| wraps(func) | |
| def newfunc(*args): | |
| return func(*args[::-1]) | |
| return newfunc | |
| def worth_it(things=None): | |
| put_it_down = flip(reverse(things)) | |
| return put_it_down | |
| def hook(): | |
| if 'worth_it' in vars(ExclusiveSong): | |
| my_thing = ['my', 'thing'] | |
| return worth_it(my_thing) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment