Skip to content

Instantly share code, notes, and snippets.

View OneOfOne's full-sized avatar
🐧
Focusing

Ahmed W. OneOfOne

🐧
Focusing
View GitHub Profile

The power of Disney...🤨

  • 1995: Disney buys ABC

  • 2006: Disney buys Pixar

  • 2009: Disney enters 30 film deal with Dreamworks

  • 2009: Disney buys Marvel

package main
import (
"log"
"os"
"os/exec"
"golang.org/x/net/ipv4"
"github.com/songgao/water"
@OneOfOne
OneOfOne / formitem.js
Created January 16, 2019 23:46
ant.design getFieldDecorator wrapper
import React from 'react';
import { Input, Checkbox, Select } from 'antd';
const FormField = (props) => {
let { hidden, form, name, required = false, message = '', valuePropName = 'value', initialValue, type, ...rest } = props,
{ getFieldDecorator } = form;
if (hidden) return null;
let Child = null;
@OneOfOne
OneOfOne / arch.md
Last active January 10, 2019 04:30
Installing Arch Linux For Dummies!
@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"
)
@OneOfOne
OneOfOne / My vscode + eslint configs
Last active April 25, 2018 06:54
VSCode Settings
.
@OneOfOne
OneOfOne / api-fetch-helper.ts
Created April 18, 2018 15:52
Smaller wrapper over fetch
export let API_BASE: string = '/api/v1/';
export type FetchBodyType = Blob | Int8Array | Int16Array | Int32Array | Uint8Array |
Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array |
DataView | ArrayBuffer | FormData | string | null;
export type PayloadFn = (h: Headers) => FetchBodyType;
export type PayloadType = Blob | FormData | string | object | PayloadFn;
#!/bin/sh
die() {
echo $1
exit $2
}
if [ "$1" = "update-vsc" ]; then
tmp="/tmp/vscode"
typ="stable"
[ "$2" != "" ] && typ="$2"
config_version 1.2
snapshot_root /media/storage/backup/
cmd_cp /usr/bin/cp
cmd_rm /usr/bin/rm
cmd_rsync /usr/bin/rsync
cmd_logger /usr/bin/logger
cmd_du /usr/bin/du
cmd_rsnapshot_diff /usr/bin/rsnapshot-diff
interval daily 7
verbose 2
@OneOfOne
OneOfOne / vsc.sh
Created April 6, 2017 16:19
VSCode launcher / updater for the lazy.
#!/bin/sh
if [ "$1" = "update-vsc" ]; then
typ="stable"
[ "$2" != "" ] && typ="$2"
pushd /usr/src
rm -rf VSCode-linux-x64.working &>/dev/null
mv VSCode-linux-x64 VSCode-linux-x64.working &>/dev/null
echo curl -L https://vscode-update.azurewebsites.net/latest/linux-x64/$typ
curl -L https://vscode-update.azurewebsites.net/latest/linux-x64/$typ | tar vxz && exit 0