Skip to content

Instantly share code, notes, and snippets.

View LinusTalk200705Transcript.wiki

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


Andrew:

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 protection.md

method 1

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

alternatively

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
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 (
"testing"
"unicode"
"unicode/utf8"
"github.com/stretchr/testify/assert"
)
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
Comparison:
@choonkeat: 0.1 i/s
@sferik: 0.1 i/s - 1.01x slower
View GIF-Screencast-OSX.md

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:

View harwriter.py
#!/usr/bin/env python
import binascii, sys, json
from libmproxy import version, tnetstring, flow
from datetime import datetime
def create_har(flows):
return {
"log":{
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
}