Skip to content

Instantly share code, notes, and snippets.

View nylen's full-sized avatar
🏗️
Constructing

James Nylen nylen

🏗️
Constructing
View GitHub Profile
<script type="text/x-jquery-tmpl" id="tmpl-list-playlists">
<table id="list-playlists">
<tr>
<th class="user">User</th>
<th class="name">Name</th>
<th class="info">Info</th>
<th class="controls">Controls</th>
</tr>
{{each items}}
<tr class="${$index % 2 ? 'odd' : 'even'}">
@nylen
nylen / gist:671765
Created November 11, 2010 00:15
Xauthority
james@debbay:~$ xauth extract tmp $DISPLAY
james@debbay:~$ sudo -u wine -i
wine@debbay:~$ export XAUTHORITY=.Xauthority
wine@debbay:~$ xauth merge ~james/tmp
xauth: creating new authority file .Xauthority
wine@debbay:~$
<?php
print file_get_contents('http://volcano.fishcams.net:82/index.srv?3=Erupt%21');
?>
<script type="text/javascript">
setTimeout(function() {
document.location.reload();
}, 5000);
</script>
@nylen
nylen / gist:723056
Created December 1, 2010 06:11
HTC Incredible proprietary files
/system/bin/akmd
/system/bin/snd: No such file or directory
/system/bin/snd8k
/system/bin/sound8k
/system/bin/spkamp: No such file or directory
/system/bin/wifitools: No such file or directory
/system/etc/AdieHWCodecSetting.csv: No such file or directory
/system/etc/AudioBTID.csv
/system/etc/TPA2018.csv
/system/etc/WPDB.zip
ui_print("Welcome to SparksMod-1.4-1.4.1 No Wipe Update!");
mount("MTD", "system", "/system");
show_progress(1, 15);
package_extract_dir("system", "/system");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
package_extract_dir("scripts", "/tmp");
set_perm(0, 0, 0777, "/tmp/remove.sh");run_program("/tmp/remove.sh");
package_extract_dir("mod","/system/lib/modules");set_perm_recursive(0, 0, 0755, 0644, "/system/lib/modules");
@nylen
nylen / gist:726354
Created December 3, 2010 00:10
MySQL backup and restore
# To do a backup:
mysqldump -uroot -pYourMySQLPassword --add-drop-database -B pfc_development > pfc_development-backup.sql
# To restore the same backup:
mysql -uroot -pYourMySQLPassword < pfc_development-backup.sql
cd /your/cyanogen/tree
repo start fix-google-apps-whatever-make-up-a-name vendor/cyanogen
cd vendor/cyanogen
# make changes
git commit -a -m 'Fix get-google-files script'
cd ../..
repo upload
@nylen
nylen / gist:728845
Created December 5, 2010 05:54
ota_from_target_files
if not OPTIONS.no_kernel:
boot_img = File("boot.img", common.BuildBootableImage(
os.path.join(OPTIONS.input_tmp, "BOOT")))
if not OPTIONS.no_recovery:
recovery_img = File("recovery.img", common.BuildBootableImage(
os.path.join(OPTIONS.input_tmp, "RECOVERY")))
if not OPTIONS.no_kernel:
MakeRecoveryPatch(output_zip, recovery_img, boot_img)
package com.android.myCompass;
import java.util.Timer;
import java.util.TimerTask;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
public class myCompass extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
james@debbay:~/.vim$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
#
nothing to commit (working directory clean)
james@debbay:~/.vim$ mkdir bundle; cd bundle
james@debbay:~/.vim/bundle$ git submodule init git://github.com/tpope/vim-abolish.git
You need to run this command from the toplevel of the working tree.
james@debbay:~/.vim/bundle$ git clone git://github.com/tpope/vim-abolish.git
Cloning into vim-abolish...