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 json | |
| import sys | |
| import time | |
| import uuid | |
| def generate_log_str(command, full_command, time): | |
| data = { |
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
| $:.unshift("/Library/RubyMotion/lib") | |
| require 'motion/project' | |
| task :update_submodules do | |
| App.log 'Git', 'Updating all our git submodules' | |
| `cd .. && git submodule foreach git checkout master && cd -` | |
| `cd .. && git submodule foreach git pull --rebase && cd -` | |
| 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
| [alias] | |
| st = status | |
| ci = commit | |
| co = checkout | |
| dt = difftool | |
| di = diff | |
| dc = diff --cached | |
| amend = commit --amend | |
| aa = add --all | |
| head = !git l -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
| # Disable menu bar transparency | |
| #defaults write NSGlobalDomain AppleEnableMenuBarTransparency -bool false | |
| # Show remaining battery time; hide percentage | |
| #defaults write com.apple.menuextra.battery ShowPercent -string "NO" | |
| #defaults write com.apple.menuextra.battery ShowTime -string "YES" | |
| # Always show scrollbars | |
| #defaults write NSGlobalDomain AppleShowScrollBars -string "Always" |
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 at 523601 | |
| pre each_char, length is | |
| post each_char, length is 0 | |
| post reading string pos is 523603 | |
| string objects len is 0 | |
| string at 523603 | |
| pre each_char, length is | |
| post each_char, length is 12 | |
| post reading string pos is 523618 | |
| string objects len is 12 |
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
| # Write a small program that extracts all the links we have in this page | |
| html_page = """<div id="navigation"> | |
| <ul> | |
| <li><a href="http://freqent.com/locations">Locations</a></li> | |
| <li><a href="http://freqent.com/business" target="_blank">For Businesses</a></li> | |
| </ul> | |
| </div>""" |
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 rpoplpushif(self, source_list, destination_list, function): | |
| """ | |
| Does RPOPLPUSH only if the match condition specified by a function. | |
| Returns nothing. | |
| """ | |
| connection = redis.Redis() | |
| value = connection.rpop(source_list) | |
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
| RPOPLPUSHIF source destination lambda x -> bool |
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
| " Vim syntax file | |
| " Language: Python | |
| " Maintainer: Dmitry Vasiliev <[email protected]> | |
| " URL: http://www.hlabs.spb.ru/vim/python.vim | |
| " Last Change: 2008-09-29 | |
| " Filenames: *.py | |
| " Version: 2.6.4 | |
| " | |
| " Based on python.vim (from Vim 6.1 distribution) | |
| " by Neil Schemenauer <[email protected]> |
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
| using System; | |
| using Gtk; | |
| using Glade; | |
| using Gecko; | |
| // 2007, Igor Guerrero Fonseca | |
| // A simple Gecko(Mozilla) browser | |
| // using the Gtk# toolkit and Glade#(XML GUI for Gnome) tool | |
| // and Gecko#(Mozilla C# binding) | |
| // TODO: There's a lot of things that can be done in this program but, |