Skip to content

Instantly share code, notes, and snippets.

View sysr-q's full-sized avatar
πŸ’Ύ
Hacking the planet.

Chris sysr-q

πŸ’Ύ
Hacking the planet.
  • Auckland, New Zealand
  • 13:33 (UTC +13:00)
View GitHub Profile
@b-
b- / !!
Last active October 20, 2022 14:35 — forked from cmlsharp/!!
# Add this to your ~/.config/fish/config.fish
# Syntax:
# To just rerun your last command, simply type '!!'
# This forked version supports "sudo !!" via two functions.
function !!
eval $history[1] $argv
end function
function sudo
if test $argv
@ndarville
ndarville / webm.md
Last active March 11, 2025 17:21
4chan’s guide to converting GIF to WebM - https://boards.4chan.org/g/res/41212767

Grab ffmpeg from https://www.ffmpeg.org/download.html

It's a command line tool which means you will have to type things with your keyboard instead of clicking on buttons.

The most trivial operation would be converting gifs:

ffmpeg -i your_gif.gif -c:v libvpx -crf 12 -b:v 500K output.webm
  • -crf values can go from 4 to 63. Lower values mean better quality.
  • -b:v is the maximum allowed bitrate. Higher means better quality.
@danneu
danneu / golang-vs-clojure-async.md
Last active November 6, 2023 04:09
Google I/O 2012 - Go Concurrency Patterns ported to Clojure Video: http://www.youtube.com/watch?v=f6kdp27TYZs
@toqueteos
toqueteos / sha1.go
Last active January 25, 2025 14:49
Minecraft player auth SHA-1 digest.
// You can test this online at: https://play.golang.org/p/hhayRT1VWgj
package main
import (
"crypto/sha1"
"encoding/hex"
"fmt"
"io"
"strings"
)
@rgthree
rgthree / _readme.md
Last active August 22, 2016 15:47
Google's iOS Gmail folding loading animation using CSS transitions & JS

NOTE

This has stopped working due to an odd timing issue with a minuscule -webkit-transition-duration value firing a webkitTransitionEnd

Checkout a pure CSS version here: https://github.com/rgthree/google-loader-css


Google/Gmail's "Folding Circle"

@alphazo
alphazo / gist:3303282
Created August 9, 2012 11:03
Clone MiFare cards using chinesse UUID writable cards

libnfc supports UUID writable cards and even has some dedicated tools for them.

However it doesn't work with some of the cards found on eBay that are even simpler to use. Sector 0 is unlocked and can be written without any additional commands. libnfc requires a small patch to get it working.

Following has been tested under ArchLinux with modified libnfc 1.5.1, mfoc 0.10.2 and a SCL3711 dongle.

Patch & recompile libnfc

The patch is fairly simple, open libnfc-1.5.1/utils/nfc-mfclassic.c and comment 2 lines (it was lines 384 and 385 for me):

// Try to write the trailer

@ajvpot
ajvpot / gist:3115176
Created July 15, 2012 05:35
Minecraft Migrated Account Session Vulnerability
                  β–ˆβ–ˆβ–ˆβ–ˆβ–“               
               β–“β–ˆβ–“β–“β–“β–“β–“β–ˆβ–ˆβ–’              
             β–’β–ˆβ–ˆβ–’β–’β–’β–’β–’β–’β–’β–“β–ˆβ–“             
            β–“β–ˆβ–“β–’β–’β–’β–’β–’β–’β–’β–’β–’β–’β–ˆβ–ˆ            
           β–ˆβ–ˆβ–’β–’β–’β–’β–“β–ˆβ–ˆβ–ˆβ–“β–’β–’β–’β–’β–“β–ˆβ–’          
         β–’β–ˆβ–“β–’β–“β–“β–“β–ˆβ–ˆβ–“β–‘β–“β–ˆβ–“β–“β–“β–“β–“β–“β–ˆβ–“         
        β–“β–ˆβ–“β–“β–“β–“β–“β–ˆβ–ˆβ–“   β–’β–ˆβ–ˆβ–“β–“β–“β–“β–“β–ˆβ–ˆβ–’       
      β–’β–ˆβ–ˆβ–“β–“β–“β–“β–ˆβ–ˆβ–ˆ       β–ˆβ–ˆβ–ˆβ–“β–“β–“β–“β–ˆβ–ˆβ–“      
     β–“β–ˆβ–ˆβ–“β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–’         β–’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ     

β–’β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ β–’β–“β–“β–“β–“β–“β–“β–“β–“β–’β–“β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–’

package main
import (
"github.com/AllenDang/w32"
"io"
"os"
"unsafe"
"errors"
"fmt"
"syscall"
@tomstuart
tomstuart / gist:1466504
Created December 12, 2011 10:40
FizzBuzz in the lambda calculus in Ruby
>> IF = -> b { b }
=> #<Proc:0x007fb4e4049cc8 (lambda)>
>> LEFT = -> p { p[-> x { -> y { x } } ] }
=> #<Proc:0x007fb4e403d680 (lambda)>
>> RIGHT = -> p { p[-> x { -> y { y } } ] }
=> #<Proc:0x007fb4e4028ff0 (lambda)>
>> IS_EMPTY = LEFT
@gorsuch
gorsuch / gist:1418850
Created December 1, 2011 18:37
clojure uuid
(defn uuid [] (str (java.util.UUID/randomUUID)))