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
grep 'android:text=' res/layout/*.xml | grep -v '@string' |
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
AlertDialog.Builder builder = new AlertDialog.Builder(NeedleView.this); | |
builder.setTitle(R.string.delete_dialog_title_needle) | |
.setMessage(R.string.delete_dialog_text_needle) | |
.setPositiveButton(R.string.dialog_button_delete, new DialogInterface.OnClickListener() { | |
public void onClick(DialogInterface dialog, int which) { | |
ndb.deleteNeedle(needleId); | |
Intent i2 = new Intent(NeedleView.this,KnittingStashHome.class); | |
i2.putExtra("com.underhilllabs.knitting.tabid",0); | |
startActivity(i2); | |
return; |
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
getString(R.string.menu_shopping) |
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
ffmpeg -an -s 600x480 -r 15 -f x11grab -i :0.0+0,25 -vcodec mpeg4 -sameq -y scast-temp.mp4 | |
ffmpeg [-an] -s <width>x<height> -r <fps> -f x11grab -i :0.0[+<ox,oy>] -codec mpeg4 -sameq -y <temporary-file>.mp4 | |
via: | |
http://polishlinux.org/linux/ubuntu/screencasts-in-ubuntu-part-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
''' | |
fricks.py | |
count the numbers of fucks in a text file | |
''' | |
fucks=0 | |
for line in open('Sprawl - 01 Neuromancer - William Gibson.txt'): | |
if "fuck" in line: | |
fucks+=1 | |
print line |
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
;; automatically set scheme-mode when opening a scheme file | |
(add-to-list 'auto-mode-alist '("\\.scm$" . scheme-mode)) | |
;;; add gist mode, easily send region to github gist | |
;;; also retrieve list of gists in a buffer, select one and download into another buffer. | |
(add-to-list 'load-path "~/.emacs.d/vendor/gist.el") | |
(require 'gist) |
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
sudo dpkg-reconfigure pulseaudio |
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
google.load("wave", "1"); | |
var wavePanel = new google.wave.WavePanel({ | |
target: document.getElementById("myWaveDiv"); | |
}); | |
wave.loadWave("googlewave.com", "a_wave_id"); |
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
mkdir drupalhead | |
cd drupalhead | |
cvs -z9 -d:pserver:anonymous:[email protected]:/cvs/drupal checkout -d drupal-cvs drupal | |
#install drupal via webpage | |
# update HEAD | |
cd drupalhead/drupal-cvs/ | |
cvs update -dP | |
# find interesting patch to test |
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
# binary number to decimal | |
def bin_to_dec(num): | |
total = 0 | |
i = 0 | |
for dig in str(num)[::-1]: | |
total += int(dig) * int(pow(2,i)) | |
i = i + 1 | |
return total |
OlderNewer