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
import logging | |
import sys | |
logger = logging.getLogger('simple_example') | |
logger.setLevel(logging.DEBUG) | |
ch = logging.StreamHandler() | |
ch.setLevel(logging.DEBUG) | |
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s') | |
ch.setFormatter(formatter) | |
logger.addHandler(ch) |
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 cffi import FFI | |
def _make_divide(): | |
libraries = ['c'] | |
extra_compile_args = [] | |
extra_link_args = [] | |
ffi = FFI() | |
ffi.cdef(r""" | |
int divide(int a, int b); |
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 opencv { | |
Exec { path => "/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin", } | |
$version = "2.4.6.1" | |
$libopencv_core_filename = "libopencv_core.so.2.4.6" | |
case $operatingsystem { | |
# Install OpenCV from source. This is an instructive example | |
# and may come in handy if we need to move to a version of |
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
import multiprocessing | |
import pprint | |
import time | |
import scapy.all as scapy | |
import subprocess | |
import sys | |
import os | |
import signal | |
import psutil |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "fedora-18-x64" | |
config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210.box" | |
config.vm.provision :puppet do |puppet| | |
puppet.manifests_path = "manifests" | |
puppet.manifest_file = "init.pp" | |
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
// ==UserScript== | |
// @name Office 365 notifications | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.1 | |
// @description Show a Google Chrome notification when there is any unread mail. | |
// @match https://*/owa/* | |
// @copyright 2012+, You | |
// ==/UserScript== | |
var current_unread_count = 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 python | |
# Some example results on my machine: | |
# ─[2013-03-30 16:19:13] ai@Mill ~/Programming/python | |
# ╰─$ ./list_vs_dict.py | |
# build_list vs. build_dict: '-9.68'% | |
# access_list vs. access_dict: '-59.29'% | |
# ╭─[2013-03-30 16:20:10] ai@Mill ~/Programming/python | |
# ╰─$ ./list_vs_dict.py | |
# build_list vs. build_dict: '-18.42'% |
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
# ~/.oh-my-zsh/themes/bira-date.zsh-theme | |
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png | |
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' | |
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' | |
local rvm_ruby='' | |
if which rvm-prompt &> /dev/null; then | |
rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}' |
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
import os | |
import sys | |
import markdown2 | |
from pygments.formatters import HtmlFormatter | |
def main(): | |
# ------------------------------------------------------------------------ | |
# Parse and validate inputs. | |
# ------------------------------------------------------------------------ | |
input_filepath = sys.argv[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
Index: src/java/org/jivesoftware/spark/ui/ChatArea.java | |
=================================================================== | |
--- src/java/org/jivesoftware/spark/ui/ChatArea.java (revision 13060) | |
+++ src/java/org/jivesoftware/spark/ui/ChatArea.java (working copy) | |
@@ -298,7 +298,7 @@ | |
final Document doc = getDocument(); | |
styles.removeAttribute("link"); | |
doc.insertString(doc.getLength(), text, styles); | |
- setCaretPosition(doc.getLength()); | |
+ //setCaretPosition(doc.getLength()); |