Skip to content

Instantly share code, notes, and snippets.

Summer summerblue

Block or report user

Report or block summerblue

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
summerblue / gist:4363625
Last active Dec 10, 2015
batch delete "manage my kindle list"
View gist:4363625
// prevent window reload while delete operation is in process, work in opera
// link:
window.location.reload = function() {};
// set the page size
pageList.pageSize = 200;
// fire up
var a=document.getElementsByClassName('rowHeaderCollapsed');
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl | sh
View static_server.js
var http = require("http"),
url = require("url"),
path = require("path"),
fs = require("fs")
port = process.argv[2] || 8888;
http.createServer(function(request, response) {
var uri = url.parse(request.url).pathname
, filename = path.join(process.cwd(), uri);
summerblue / python-SimpleHTTPServer-util
Created May 19, 2013
View python-SimpleHTTPServer-util
echo "Serving at http://localhost:3000"
python -m SimpleHTTPServer 3000
View gist:5611058
// We start by checking if the browser supports the
// Clipboard object. If not, we need to create a
// contenteditable element that catches all pasted data
if (!window.Clipboard) {
var pasteCatcher = document.createElement("div");
// Firefox allows images to be pasted into contenteditable elements
pasteCatcher.setAttribute("contenteditable", "");
// We can hide the element and append it to the body,
summerblue / gist:5655070
Created May 27, 2013
opening Go2Shell app preferences
View gist:5655070
open -a Go2Shell --args config
summerblue / gist:5669434
Created May 29, 2013
删除所有带后缀 .video 的文件
View gist:5669434
find . -name "*.video" -exec rm -rf {} \;

Laravel Cheat-Sheet

Common usage

View::share('user', $user); Makes $user available to all views.

URI::segment(1); First segement uf an URL (eg. = de).

View gist:5720257
umount -l /home/www/cj
mount /home/www/cj
summerblue / gist:5791164
Created Jun 16, 2013
Finding the process that is using a certain port in Linux, using the pid to kill
View gist:5791164
lsof -i tcp:7070
You can’t perform that action at this time.