Skip to content

Instantly share code, notes, and snippets.

View OneOfOne's full-sized avatar
🐧
Focusing

Ahmed W. OneOfOne

🐧
Focusing
View GitHub Profile
@OneOfOne
OneOfOne / wnew.sh
Created December 4, 2011 12:20
Arch32D's wine launcher script.
#!/bin/bash
IFS=$(echo -en "\n\b")
if [ -e /opt/arch32 ]; then
CDIR="$(pwd)" arch32 $0 ${@}; exit
else
if [ -d "$CDIR" ]; then
cd "$CDIR"
fi
unset CDIR
@OneOfOne
OneOfOne / interface_vs_type_test.go
Created April 1, 2014 20:39
Benchmarking interface{} vs typed parameters.
package main
import (
"testing"
"sync/atomic"
)
func sumI(nums... interface{}) interface{} {
var s uint64
for _, n := range nums {
<?php
/**
* Plugin Name: OneOfOne's NoSpam
* Plugin URI: http://limitlessfx.com/php/nospam-wp
* Description: Simple transparent no-spam plugin
* Version: 0.4
* Author: OneOfOne
* Author URI: http://limitlessfx.com/
* License: Apache-2
*/
@OneOfOne
OneOfOne / xxhash_map_test.go
Created July 27, 2014 09:56
Go map[string] vs xxhash map[uint64]
package xxhash_map_test
import (
"bytes"
"fmt"
"testing"
"github.com/OneOfOne/xxhash"
)
package main
import (
"fmt"
"unsafe"
)
//#include "xxhash_9p.c"
//import "C" //uncomment this and comment the next line for the cgo version
func XXH32_test(in unsafe.Pointer, l uint32, seed uint32) uint32
@OneOfOne
OneOfOne / .vimrc
Created September 15, 2014 15:08
vimgo-vimrc
set nocompatible
filetype off " required
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'bling/vim-airline'
@OneOfOne
OneOfOne / .jsbeautifyrc
Created February 3, 2015 23:47
HTML-CSS-JS Prettify settings
{
"html": {
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg"],
"brace_style": "collapse",
"end_with_newline": true,
"indent_char": "\t",
"indent_handlebars": false,
"indent_inner_html": false,
"indent_scripts": "keep",
"indent_size": 1,
package main
import (
"bufio"
"fmt"
"os"
"os/exec"
"strings"
"time"
)
@OneOfOne
OneOfOne / settings.json
Last active November 11, 2016 19:44
vscode config (1.8.0-insider update)
{
"editor.fontFamily": "Fira Code Medium",
"editor.fontLigatures": true,
"editor.fontSize": 13,
"editor.tabSize": 4,
"editor.insertSpaces": false,
"editor.quickSuggestionsDelay": 50,
"editor.renderWhitespace": "boundary",
"editor.stablePeek": true,
"editor.glyphMargin": true,
@OneOfOne
OneOfOne / sftpput.sh
Last active March 4, 2016 15:10
scp replacement using sftp because scp is a horrible piece of crap.
#!/bin/sh
#
# this script is under public domain, go nuts.
# originally posted by OneOfOne at https://gist.github.com/OneOfOne/6598fd2f79145200b512
#
if [ "$#" -lt 2 ]; then
echo "usage: $0 files... [sftp args] host:/path" > /dev/stderr
exit 1