Skip to content

Instantly share code, notes, and snippets.


This is transcript of Tech Talk: Linus Torvalds on Git at Google on YouTube.


Thank you, for coming everybody, some of you probably already have heard of Linus Torvalds, those of you who haven't, you are the people with Macintoshes on your laps.

View disable mcafee endpoint

method 1

sudo /usr/local/McAfee/AntiMalware/VSControl stopoas


sudo defaults write /Library/Preferences/com.mcafee.ssm.antimalware.plist OAS_Enable -bool False
sudo /usr/local/McAfee/AntiMalware/VSControl stop
sudo /usr/local/McAfee/AntiMalware/VSControl reload
choonkeat / underscore.go
Created Feb 7, 2018 — forked from regeda/underscore.go
Convert CamelCase to underscore in golang with UTF-8 support.
View underscore.go
package main
import (
View cruby.txt
Calculating -------------------------------------
@choonkeat 1.000 i/100ms
@sferik 1.000 i/100ms
@choonkeat 0.100 (± 0.0%) i/s - 1.000 in 10.000901s
@sferik 0.099 (± 0.0%) i/s - 1.000 in 10.087707s
@choonkeat: 0.1 i/s
@sferik: 0.1 i/s - 1.01x slower

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


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

#!/usr/bin/env python
import binascii, sys, json
from libmproxy import version, tnetstring, flow
from datetime import datetime
def create_har(flows):
return {
View zoom.js
/* tested on the iPad and iPhone */
function getZoomFactor() {
var deviceWidth, landscape = Math.abs(window.orientation) == 90
// workaround for strange screen.height on the iPhone (v3.1.3)
if (window.screen.width == 320) deviceWidth = landscape ? 480 : 320
else deviceWidth = window.screen[landscape ? "height" : "width"]
return deviceWidth / window.innerWidth