Skip to content

Instantly share code, notes, and snippets.

View xgin's full-sized avatar

Eugene Kazakov xgin

View GitHub Profile
@pmurzakov
pmurzakov / Badoo PHP Russia 2019 talk.md
Last active September 10, 2021 22:01
Badoo PHP performance -- useful links and snippets -- PHP Russia 2019 talk
@hasit
hasit / buffalo.fish
Last active May 13, 2020 14:11
Tab completion support for Buffalo in fish shell
# fish completion for buffalo
function __fish_buffalo_grifts
command grift list $argv ^/dev/null | string match -r '\s.*?#' | string trim -c ' #' | string trim
end
# general
complete -xc 'buffalo' -n '__fish_use_subcommand' -s h -l help -d 'help for buffalo'
# build
@borismus
borismus / gist:1032746
Created June 18, 2011 02:46
Convert a base64 string into a binary Uint8 Array
var BASE64_MARKER = ';base64,';
function convertDataURIToBinary(dataURI) {
var base64Index = dataURI.indexOf(BASE64_MARKER) + BASE64_MARKER.length;
var base64 = dataURI.substring(base64Index);
var raw = window.atob(base64);
var rawLength = raw.length;
var array = new Uint8Array(new ArrayBuffer(rawLength));
for(i = 0; i < rawLength; i++) {