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")
//除法函数,用来得到精确的除法结果 | |
//说明:javascript的除法结果会有误差,在两个浮点数相除的时候会比较明显。这个函数返回较为精确的除法结果。 | |
//调用:accDiv(arg1,arg2) | |
//返回值:arg1除以arg2的精确结果 | |
function accDiv(arg1, arg2) { | |
var t1 = 0, | |
t2 = 0, | |
r1, r2; | |
try { | |
t1 = arg1.toString().split(".")[1].length |
<!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 原始词库 | |
*/ |
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` |
#!/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 |
/* 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 |
### 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 |
#!/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 |
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")
#!/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 |