Skip to content

Instantly share code, notes, and snippets.

View forrest-mao's full-sized avatar

maolifu forrest-mao

  • OpsMind
  • Shanghai
View GitHub Profile
@rfunduk
rfunduk / osx.sh
Last active August 27, 2021 15:00 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with useful tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2263406/osx.sh | sh
#
@jemygraw
jemygraw / all_in_one_batch_upload_mac.sh
Created January 24, 2015 08:59
curl&qbox upload test script
gecho -e "curl\tqboxrsctl"
#set variables
uploadFile="/Users/jemy/Documents/qiniu.png"
uploadHost="up.qiniu.com"
uploadToken="ELUs327kxVPJrGCXqWae9yioc0xYZyrIpbM6Wh6o:YEZCdEInhP2a-4Whb_D23nPl6b4=:eyJzY29wZSI6ImlmLXBibCIsImRlYWRsaW5lIjoxNDIyMDkxOTk3fQ=="
uploadBucket="if-pbl"
uploadTimes=1000
curlPrefix="curl_1277431"
@jemygraw
jemygraw / all_in_one_batch_upload_linux.sh
Created January 24, 2015 09:00
curl&qbox upload test script
echo -e "curl\tqboxrsctl"
#set variables
uploadFile="/home/jemy/Documents/qiniu.png"
uploadHost="upload.qiniu.com"
uploadToken="ELUs327kxVPJrGCXqWae9yioc0xYZyrIpbM6Wh6o:YEZCdEInhP2a-4Whb_D23nPl6b4=:eyJzY29wZSI6ImlmLXBibCIsImRlYWRsaW5lIjoxNDIyMDkxOTk3fQ=="
uploadBucket="if-pbl"
uploadTimes=1000
curlPrefix="curl_pic"
@kaleksandrov
kaleksandrov / global-protect.sh
Last active June 28, 2024 21:59
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)
var dnsd = require('dnsd')
var http = require('http')
var datx = require('ipip-datx');
var value;
dnsd.createServer(function(req, res) {
var key = JSON.stringify(req.question).split(",")[0].split(":")[1]
value = req.connection.remoteAddress.toString()