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
Select Transformation | |
Invert Transformation | |
End Transformation | |
Empty Transformation | |
Remove Transformation | |
Unwrap Transformation | |
Wrap Transformation | |
Trace Transformation | |
Filter Transformation | |
Map Transformation |
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
+-plugin-log/ | |
| | |
+-logpackage/ | |
| | | |
| +-__init__.py | |
| | | |
| +-logplugin.py | |
| | |
+-setup.py |
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 | |
# tree.py | |
# | |
# Written by Doug Dahms | |
# | |
# Prints the tree structure for the path specified on the command line | |
from os import listdir, sep | |
from os.path import abspath, basename, isdir |
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
=== Directory tree structure | |
+-helloworld-plugin/ | |
| | |
+-helloworld/ | |
| | | |
| +-__init__.py | |
| | | |
| +-templates/ | |
| | | |
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
# add try-catch block to ignore exceptions raised from re.findall() | |
def get_versions_for_package(pkg): | |
'Get a list of available versions for package' | |
pkg = denormalize(pkg) | |
content = urlopen('http://code.google.com/p/rudix/downloads/list?q=Filename:%s' % pkg).read() | |
try: | |
urls = re.findall('(rudix.googlecode.com/files/(%s-([\w.]+(?:-\d+)?(?:.i386)?)(\.dmg|\.pkg)))' % pkg, content) | |
versions = sorted(list(set(urls)), cmp=lambda x, y: version_compare(x[2], y[2])) |
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
Platform Version API Level | |
================ ========= | |
Android 3.1 12 | |
Android 3.0 11 | |
Android 2.3.4 10 | |
Android 2.3.3 | |
Android 2.3 9 | |
Android 2.2 8 | |
Android 2.1 7 | |
Android 2.0.1 6 |
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
# Add line numbers to file | |
cat file | perl -wne 'while (<STDIN>) { print "$. $_" }' | |
# Add '!' prefix for WikiFormatting of classnames | |
# pattern: | |
# - 2 or more capital letters | |
# - no consecutive capital letters | |
# or use {{{ ... }}} for preformatted code block | |
cat file | grep -v "^\s*$" | sed -e "s/$/ [[br]]/g" | perl -wne '$_ =~ s/(?!\w*[A-Z]{2,}\w*)((?<!")[A-Z]\w+[A-Z]\w+)/!$1/g; print;' |
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
# http://www.commandlinefu.com/commands/favourites/plaintext | |
# commandlinefu.com by David Winterbottom | |
# Repoint an existing symlink to a new location | |
ln -nsf <TARGET> <LINK> | |
# RDP through SSH tunnel | |
ssh -f -L3389:<RDP_HOST>:3389 <SSH_PROXY> "sleep 10" && rdesktop -T'<WINDOW_TITLE>' -uAdministrator -g800x600 -a8 -rsound:off -rclipboard:PRIMARYCLIPBOARD -5 localhost | |
# Control ssh connection |
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 com.exercise.AndroidPaint; | |
import android.app.Activity; | |
import android.content.Context; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapFactory; | |
import android.graphics.Canvas; | |
import android.os.Bundle; | |
import android.view.View; |
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
$ ghci -XTemplateHaskell | |
Prelude> :m +Language.Haskell.TH | |
Prelude Language.Haskell.TH> runQ [| let x = 5 in x * x |] | |
LetE [ValD (VarP x_0) (NormalB (LitE (IntegerL 5))) []] (InfixE (Just (VarE x_0)) (VarE GHC.Num.*) (Just (VarE x_0))) | |
Prelude Language.Haskell.TH> $(runQ [| let x = 5 in x * x |]) | |
25 |