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 Set = function() { | |
| this.items = {}; | |
| this.add = function(key) { | |
| this.items[key] = true; | |
| } | |
| this.exists = function(key) { | |
| return this.items.hasOwnProperty(key); | |
| } | |
| this.as_array = function() { | |
| var keys = []; |
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 foo(bar) | |
| #Hoe moet je IDE nu weten wat voor type bar is? | |
| 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
| var checkForRelativeLinks = function() { | |
| console.log("Checking for relative urls") | |
| $('a').each(function () { | |
| var url = $(this).attr('href'); | |
| if (url && url != "#" && url.substr(0, 7) != "http://" && url.substr(0, 11) != "javascript:") { | |
| console.log(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
| #!/usr/bin/env python | |
| import subprocess | |
| import re | |
| import sys | |
| from clint.textui import colored | |
| from time import sleep | |
| def parse_ranges(ranges): | |
| parsed_ranges = [] | |
| for range_item in ranges: |
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 Buffer(object): | |
| def __init__(self, window, lines): | |
| self.window = window | |
| self.lines = lines | |
| self.buffer = [""] | |
| def write(self, text): | |
| lines = text.split("\n") | |
| self.buffer[-1] += lines[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
| #!/bin/sh | |
| echo "Checking codestyle" | |
| echo | |
| maxErrorLevel=0 | |
| for file in $(git diff --cached --name-only --diff-filter=M -z HEAD) | |
| do | |
| echo "Checking $file" |
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
| <?php | |
| /** | |
| * @dataProvider provider | |
| */ | |
| public function test_set_access_token_sets_right_post_values($name, $value) | |
| { | |
| $mock_request = $this->getMock('HTTP_RequestWrapper'); | |
| $mock_request->expects($this->atLeastOnce()) |
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
| <?php | |
| $query = DB::insert('users_roles', array('user_id', 'role_id')) | |
| ->values(array($this->id, DB::expr("(". | |
| DB::select('id') | |
| ->from('roles') | |
| ->where('name', '=', $rolename)) | |
| .")")); | |
| echo $query | |
| ?> |
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
| URxvt.perl-ext-common: default,matcher | |
| URxvt.urlLauncher: google-chrome | |
| !URxvt.matcher.rend.0: Uline Bold fg7 | |
| URxvt.matcher.button: 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
| from jsb.lib.threadloop import TimedLoop | |
| from jsb.lib.persistconfig import PersistConfig | |
| from jsb.lib.persist import PlugPersist | |
| from jsb.lib.fleet import getfleet | |
| from jsb.lib.commands import cmnds | |
| from jsb.lib.examples import examples | |
| #tweepy |