Skip to content

Instantly share code, notes, and snippets.

Avatar

Joseph Spurrier josephspurrier

View GitHub Profile
@magnetikonline
magnetikonline / README.md
Last active January 17, 2023 18:54
List all Git repository objects by size.
View README.md

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
@nathan-osman
nathan-osman / win32.go
Last active January 27, 2023 04:37
Simple Windows GUI application written in Go
View win32.go
package main
import (
"log"
"syscall"
"unsafe"
)
var (
kernel32 = syscall.NewLazyDLL("kernel32.dll")
@bradleypeabody
bradleypeabody / gist:185b1d7ed6c0c2ab6cec
Last active September 28, 2022 20:57
golang, convert UTF-16 to UTF-8 string
View gist:185b1d7ed6c0c2ab6cec
package main
// http://play.golang.org/p/fVf7duRtdH
import "fmt"
import "unicode/utf16"
import "unicode/utf8"
import "bytes"
func main() {
@Arkham
Arkham / remote.md
Last active May 22, 2022 08:00
Remote, office not required
View remote.md

Remote, Office Not Required

The Time is Right for Remote Work

Why work doesn't happen at work

The office during the day has become the last place people want to be when then really want to get work done.

Offices have become interruption factories: it's just one interruption after

@johan
johan / index.md
Last active November 20, 2020 00:22
osx + java 7 = painfully easy
View index.md

Step 1

Does your osx terminal speak java 7? Start Terminal.app and try: java -version:

> java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
@barryvdh
barryvdh / _ide_helper.php
Last active November 24, 2022 15:00
Laravel IDE Helper for Netbeans / PhpStorm / Sublime Text 2 CodeIntel, generated using https://github.com/barryvdh/laravel-ide-helper
View _ide_helper.php
<?php
/**
* A helper file for Laravel 5, to provide autocomplete information to your IDE
* Generated for Laravel 5.5.13 on 2017-09-28.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
namespace {
exit("This file should not be included, only analyzed by your IDE");
@andelf
andelf / sendMail.go
Last active January 29, 2023 20:53
golang send mail net/smtp SMTP
View sendMail.go
package main
import (
"log"
"net/mail"
"encoding/base64"
"net/smtp"
"fmt"
"strings"
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know
View latency.markdown

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs