Skip to content

Instantly share code, notes, and snippets.

View pwlin's full-sized avatar
🎧
Listening to Africa by Toto

pwlin pwlin

🎧
Listening to Africa by Toto
View GitHub Profile
// Turn OFF emulated prepared statements
$dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
@pwlin
pwlin / gist:9203685
Last active August 29, 2015 13:56
Gmail basic html as default
https://mail.google.com/mail/?ui=html&zy=h
@pwlin
pwlin / gist:e8f7edae718fee7929ac
Created May 7, 2014 21:06
How to fix missing libudev.so.0 for Chrome to start again?
http://askubuntu.com/questions/369310/how-to-fix-missing-libudev-so-0-for-chrome-to-start-again
window.onerror = function(message, url, lineNumber) {
console.log("Error: "+message+" in "+url+" at line "+lineNumber);
}
mount - /opt/mnt/dir1 -t cifs -o UNC=//192.168.1.2/dir1,username=usert1,password=pass1
@pwlin
pwlin / gist:5e1c756623b5685b6f8e
Last active August 29, 2015 14:08
windows 7 boot recovery/ grub 4 dos
bcdboot c:\windows /s c:
================
timeout 5
default 0
title Windows 7
rootnoverify (hd0,1)
chainloader +1
@pwlin
pwlin / gist:8a84ae0c66c87d7ae053
Created December 7, 2014 17:41
nodewebkit node-main
process.on('uncaughtException', function(err) {
console.log('Uncaught node.js Error: ', err);
});
@pwlin
pwlin / gist:ee784e2c7548a9c9cc21
Created February 28, 2015 16:23
Registering a Protocol with Gnome
gconftool-2 -t string -s /desktop/gnome/url-handlers/foo/command 'foo "%s"'
gconftool-2 -s /desktop/gnome/url-handlers/foo/needs_terminal false -t bool
gconftool-2 -s /desktop/gnome/url-handlers/foo/enabled true -t bool
# -*- shell-script -*-
#
# Ferm example script
#
# Firewall configuration for a web server.
table filter {
chain INPUT {
policy DROP;
wget https://freevps.us/downloads/bench.sh -O – -o /dev/null | bash