Skip to content

Instantly share code, notes, and snippets.

View creamidea's full-sized avatar

NekoTrek creamidea

View GitHub Profile
@creamidea
creamidea / jquery.ba-tinypubsub.js
Created December 17, 2012 14:00 — forked from cowboy/HEY-YOU.md
这是一个用js实现的订阅/发布系统,写的很简洁,但是非常的完美。
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
van9ogh@VAN9OGH $ wpa_passphrase test "mypasswd"
network={
ssid="test"
#psk="mypasswd"
psk=0e804f52de7e7565be873500fa038cef6a9e571f56d6757f419191f3b4fe65c6
}
@creamidea
creamidea / convert.sh
Created September 26, 2013 03:21 — forked from wilmoore/convert.sh
#!/bin/bash
FILES=`find -iname *.txt -print`
for FILE in $FILES
do
# replace the + to # chars
sed -i -r 's/^([+]{4})\s/#### /' $FILE
sed -i -r 's/^([+]{3})\s/### /' $FILE
sed -i -r 's/^([+]{2})\s/## /' $FILE
sed -i -r 's/^([+]{1})\s/# /' $FILE
sed -i -r 's/(\[php\])/<?php/' $FILE

https://github.com/mustache/emacs

In your shell:

cd ~/.emacs.d/vendor
curl -O https://github.com/mustache/emacs/raw/master/mustache-mode.el

In your Emacs config:

(add-to-list 'load-path "~/.emacs.d/vendor/mustache-mode.el")

#!/usr/bin/env python
__copyright__ = 'Yuanxuan Wang <zellux at gmail dot com>'
from calibre.web.feeds.news import BasicNewsRecipe
from calibre.ebooks.BeautifulSoup import Tag, NavigableString
from collections import OrderedDict
from contextlib import nested, closing
import json
### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set cd4b8d8b-3265-4fa6-b8a6-9b3b74d9f849
insmod png
if background_image /share/images/desktop-base/spacefun-grub.png; then
set color_normal=light-gray/black
set color_highlight=white/black
else
@creamidea
creamidea / deep_extend_javascript_objects_underscore_mixin.js
Created January 28, 2016 05:05 — forked from kurtmilam/deep_extend_javascript_objects_underscore_mixin.js
Deep Extend / Merge Javascript Objects - underscore.js Mixin
/* Copyright (C) 2012-2014 Kurt Milam - http://xioup.com | Source: https://gist.github.com/1868955
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TO
@creamidea
creamidea / menu.lst
Created March 31, 2016 06:15 — forked from poppen/menu.lst
menu.lst of grub4dos for booting iso images from usb drive
# This is a sample menu.lst file. You should make some changes to it.
# The old install method of booting via the stage-files has been removed.
# Please install GRLDR boot strap code to MBR with the bootlace.com
# utility under DOS/Win9x or Linux.
color white/light-blue yellow/cyan light-gray/magenta white/light-red
title Acronis True Image Home
find --set-root /atih.iso
map /atih.iso (0xff) || map --mem /atih.iso (0xff)