Skip to content

Instantly share code, notes, and snippets.

View jollychang's full-sized avatar
🎼
Focusing

William Zhang jollychang

🎼
Focusing
View GitHub Profile
@jollychang
jollychang / getFileByName.gs
Created March 16, 2021 11:25
Google App Script funtions
//https://yagisanatode.com/2018/10/05/google-apps-script-get-file-by-name-with-optional-parent-folder-crosscheck/
function getFileByName(fileName, fileInFolder){
var filecount = 0;
var dupFileArray = [];
var folderID = "";
var files = DriveApp.getFilesByName(fileName);
while(files.hasNext()){
@jollychang
jollychang / create_vultr_server.sh
Created March 2, 2019 01:49
create vultr server by API
curl -H 'API-Key: YOUR_VULTR_TOKEN' https://api.vultr.com/v1/server/create --data 'DCID=25' --data 'VPSPLANID=201' --data 'OSID=215'
curl -H 'API-Key: YOUR_VULTR_TOKEN' https://api.vultr.com/v1/server/create --data 'DCID=40' --data 'VPSPLANID=201' --data 'OSID=215’
curl -H 'API-Key: YOUR_VULTR_TOKEN' https://api.vultr.com/v1/server/create --data 'DCID=6' --data 'VPSPLANID=199' --data 'OSID=215'
#!/usr/bin/env python
#-*-coding:utf-8-*-
import urllib, json , os
from shutil import rmtree
url = 'http:/yourjenkinsbaseurl/api/python?pretty=true'
jenkins_workspace_path = '/data/jenkins/workspace/'
data = eval(urllib.urlopen(url).read())
jobnames = []
{
"status": 0,
"encoding": "UTF-8",
"isdebug": false,
"vip": 0,
"isloop": 1,
"iscustom": false,
"data": [
{
"status": 1,
@jollychang
jollychang / gist:1048635
Created June 27, 2011 10:24
selenium and xvfb services @ gentoo
$ head -1000 /etc/conf.d/xvfb* /etc/init.d/{xvfb,selenium-daemon}
==> /etc/conf.d/xvfb <==
XVFB=/usr/bin/Xvfb
XVFBARGS=":90 -auth /etc/conf.d/xvfb.cfg -nolisten tcp"
PIDFILE=/var/run/xvfb.pid
==> /etc/conf.d/xvfb.cfg <==
localhost
==> /etc/init.d/xvfb <==
@jollychang
jollychang / README.md
Last active February 3, 2017 10:18
re-structure folder by date
@jollychang
jollychang / postmortem.md
Created January 22, 2017 09:52 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
@jollychang
jollychang / gist:585437a39fa78e0d6b7d1855a6c1d3a4
Created August 25, 2016 03:51 — forked from dcancel/gist:2345016
Facebook Engineering Bootcamp Links
https://www.facebook.com/notes/facebook-engineering/facebook-engineering-bootcamp/177577963919
https://www.facebook.com/notes/facebook-engineering/bootcamp-growing-culture-at-facebook/249415563919
http://www.quora.com/How-does-Facebook-Engineerings-Bootcamp-program-work
http://thenextweb.com/facebook/2011/10/11/revealed-details-of-bootcamp-all-new-facebook-engineers-complete-video/
<!doctype html>
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ -->
<html>
<head>
<title>iOS 8 web app</title>
<!-- CONFIGURATION -->

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: