Skip to content

Instantly share code, notes, and snippets.

pwlin pwlin

Block or report user

Report or block pwlin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:807aa650b099944788a7
# -*- shell-script -*-
#
# Ferm example script
#
# Firewall configuration for a web server.
table filter {
chain INPUT {
policy DROP;
@pwlin
pwlin / gist:ee784e2c7548a9c9cc21
Created Feb 28, 2015
Registering a Protocol with Gnome
View gist:ee784e2c7548a9c9cc21
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
View gist:8a84ae0c66c87d7ae053
process.on('uncaughtException', function(err) {
console.log('Uncaught node.js Error: ', err);
});
@pwlin
pwlin / gist:5e1c756623b5685b6f8e
Last active Aug 29, 2015
windows 7 boot recovery/ grub 4 dos
View gist:5e1c756623b5685b6f8e
bcdboot c:\windows /s c:
================
timeout 5
default 0
title Windows 7
rootnoverify (hd0,1)
chainloader +1
View gist:64ec090be88d0a96936d
mount - /opt/mnt/dir1 -t cifs -o UNC=//192.168.1.2/dir1,username=usert1,password=pass1
View gist:0451c136e8266910becd
window.onerror = function(message, url, lineNumber) {
console.log("Error: "+message+" in "+url+" at line "+lineNumber);
}
@pwlin
pwlin / gist:e8f7edae718fee7929ac
Created May 7, 2014
How to fix missing libudev.so.0 for Chrome to start again?
View gist:e8f7edae718fee7929ac
http://askubuntu.com/questions/369310/how-to-fix-missing-libudev-so-0-for-chrome-to-start-again
@pwlin
pwlin / gist:9203685
Last active Aug 29, 2015
Gmail basic html as default
View gist:9203685
https://mail.google.com/mail/?ui=html&zy=h
@pwlin
pwlin / gist:9068069
Last active Jun 4, 2018
nodejs open external program
View gist:9068069
function testExternalApp(){
//////////////////////////////////
// http://stackoverflow.com/questions/18183882/node-webkit-how-to-execute-an-exe-file
// https://github.com/rogerwang/node-webkit/wiki/Clipboard
var execFile = require('child_process').execFile, child;
child = execFile('C:\\Program Files\\Microsoft Office\\Office12\\winword.exe', function(error,stdout,stderr) {
if (error) {
//console.log(error.stack);
View gist:8749378
// Turn OFF emulated prepared statements
$dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
You can’t perform that action at this time.