Simple and easy 😄
curl -s https://gist.githubusercontent.com/song940/75d2192886d865032726/raw/install.sh | bash
#!/bin/bash | |
/etc/init.d/ntp stop | |
until ping -nq -c3 8.8.8.8 > /dev/null; do | |
echo "Waiting for network..." | |
done | |
ntpdate -s time.nist.gov |
# | |
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/) | |
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/ | |
# | |
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything | |
# | |
# Alternative to http://www.groths.org/trim-enabler-3-0-released/ | |
# Method behind this madness described: http://forums.macrumors.com/showthread.php?t=1409151&page=4 | |
# See discussion in comments here: https://www.macupdate.com/app/mac/39654/lion-tweaks | |
# And here: http://forums.macrumors.com/showthread.php?t=1410459 |
/** | |
* [YangCongHelper] | |
* @param {[type]} window [global] | |
* @param {[type]} jq [jQuery] | |
* @param {[type]} undefined [undefined] | |
* @return {[type]} [nothing] | |
*/ | |
;(function(window, jq, undefined){ | |
/** | |
* [YangCongHelper Class] |
#!env bash | |
HOST="acg.sugling.in" | |
HEADER="User-Agent: ACGArt/4.4.11 CFNetwork/672.1.15 Darwin/14.0.0" | |
URL="http://$HOST/json_daily.php?device=iphone5&pro=yes&user=yes&sexyfilter=no&version=m.4.4.11" | |
curl -H "$HEADER" $URL | underscore select .imgs | underscore flatten --outfmt text | awk '{ print "http://acg.sugling.in/_uploadfiles/iphone5/640/"$1 }' | xargs -n1 wget |
var express = require('express'); | |
var xmlParser = require('express-xml'); | |
var wechat = require('wechat-lite'); | |
var Simsimi = require('simsimi'); | |
var app = express(); | |
var simsimi = new Simsimi({ | |
lc : 'zh', | |
key: '7f503329-9755-49dc-95d3-c586cf578914' |
<!-- put file in your html --> | |
<script src="../common/forms/gh-pattern.js"></script> | |
<script src="../common/forms/gh-unique.js"></script> | |
<!-- require javascript to app --> | |
<script type="text/javascript"> | |
angular.module('ghValidation', [ 'ghPattern' ,'ghUnique' ]); | |
</script> | |
<!-- |
#!/usr/bin/env bash | |
LATEST_URL="http://nginx.org/download/nginx-1.6.2.tar.gz" | |
sudo apt-get update | |
sudo apt-get install libssl-dev | |
sudo apt-get install zlibc zlib1g zlib1g-dev | |
wget $LATEST_URL -O /tmp/nginx-latest |
#!/usr/bin/env bash | |
# ~$ ./auto-like.sh AWjSRV4NJ6K1UqL9m4KiH-yf | |
# ~$ like OK | |
SID=$1 | |
URL="http://ish.z.qq.com/infocenter_v2.jsp?sid=$SID" | |
echo $URL | |
LIKE_URL=`curl -s $URL | grep -o 'http://[^"]*' | grep like_action | sed 's/amp;//g'` |
_.mixin({ | |
// Return a copy of the object containing all but the blacklisted properties. | |
unpick: function (obj) { | |
return _.pick(obj, _.difference(_.keys(obj), _.flatten(Array.prototype.slice.call(arguments, 1)))); | |
}, | |
average: function (arr) { | |
return _.reduce(arr, function(memo, num){ | |
return memo + num; | |
}, 0) / arr.length; | |
} |