Skip to content

Instantly share code, notes, and snippets.

View creamidea's full-sized avatar

NekoTrek creamidea

View GitHub Profile
#!/usr/bin/env python
# Linux usage: ./extract_tampermonkey_script.py "/home/<USER>/.config/<BROWSER>/Default/Local Extension Settings/<EXTENSION_ID>"
# i.e.: ./extract_tampermonkey_script.py "/home/foo/.config/google-chrome-beta/Default/Local Extension Settings/gcalenpjmijncebpfijmoaglllgpjagf"
# Mac usage: ./extract_tampermonkey_script.py "/Users/<USER>/Library/Application Support/Google/Chrome/Default/Local Extension Settings/<EXTENSION_ID>/"
# i.e.: ./extract_tampermonkey_script.py "/Users/foo/Library/Application Support/Google/Chrome/Default/Local Extension Settings/dhdgffkkebhmkfjojejmpbldmpobfkfo/"
import leveldb
import sys
import re
@creamidea
creamidea / ReadMe.Txt
Created March 30, 2017 04:03 — forked from jb510/ReadMe.md
OS X LaunchD job and script to automaticaly update homebrew
1. Place homebrewupdate.sh where ever you like, I use ~/bin/homebrewupdate.sh
2. Place the .plist file in ~/Library/LaunchAgents and update the path to your bash script
3. run 'launchctl load ~/Library/LaunchAgents/com.jb510.homebrewupdate.plist' or whatever you've named your plist file.
4. check 'launchctl list | grep jb510' to see that it's running
Note: you might need to `chmod +x homebrewupdate.sh`
@creamidea
creamidea / splid_words.html
Created July 4, 2017 15:03 — forked from onlytiancai/splid_words.html
javascript实现的正向最大匹配机械分词
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test</title>
</head>
<body>
<script type="text/javascript">
/*
* @description 原始词库
*/
@creamidea
creamidea / BigDecimal.js
Created January 11, 2018 09:42 — forked from xinlc/BigDecimal.js
JavaScript高精度计算
//除法函数,用来得到精确的除法结果
//说明:javascript的除法结果会有误差,在两个浮点数相除的时候会比较明显。这个函数返回较为精确的除法结果。
//调用:accDiv(arg1,arg2)
//返回值:arg1除以arg2的精确结果
function accDiv(arg1, arg2) {
var t1 = 0,
t2 = 0,
r1, r2;
try {
t1 = arg1.toString().split(".")[1].length