Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# s3-to-AWStat
# Copyright 2013 Xavier Decuyper
# http://www.savjee.be
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
#!/bin/bash
# s3-to-AWStat
# Copyright 2013 Xavier Decuyper
# http://www.savjee.be
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
#!/bin/bash
# A simple script to backup an organization's GitHub repositories.
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files
GHBU_ORG=${GHBU_ORG-"autographer"} # the GitHub organization whose repos will be backed up
GHBU_API=${GHBU_API-"https://api.github.com"} # base URI for the GitHub API
GHBU_GITHOST=${GHBU_GITHOST-"<CHANGE-ME>.github.com"} # the GitHub hostname (see comments)
# I recommend using an API token so it is easily trackable and removable.
# Note that you MUST have SSH keys for a user with the access to all repos set up
@phelma
phelma / gist:8149854
Created December 27, 2013 17:18
open emu crash after launch >> click automatically check for updates
Process: OpenEmu [26857]
Path: /Applications/OpenEmu.app/Contents/MacOS/OpenEmu
Identifier: org.openemu.OpenEmu
Version: 1.0
Code Type: X86-64 (Native)
Parent Process: launchd [154]
Responsible: OpenEmu [26857]
User ID: 501
Date/Time: 2013-12-27 17:16:33.021 +0000
@phelma
phelma / Dockerfile
Last active February 24, 2016 19:32
fbcunn-dockerfile
FROM kaixhin/cuda-torch:latest
MAINTAINER Phil Helm <philip.helm@omgplc.com>
ENV dir /root
# fbcunn https://github.com/facebook/fbcunn
# Install as https://github.com/facebook/fbcunn/blob/master/INSTALL.md
# Install Folly, fbthrift, thpp and fblualib
RUN sudo apt-get install -y \
@phelma
phelma / latency.txt
Created July 18, 2016 12:01 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@phelma
phelma / keybase.md
Created March 1, 2017 11:58
Keybase Proof

Keybase proof

I hereby claim:

  • I am phelma on github.
  • I am phelm (https://keybase.io/phelm) on keybase.
  • I have a public key whose fingerprint is 5151 4CB5 23AC 06B7 1444 35AA A6BE 6922 1DF1 196D

To claim this, I am signing this object:

@phelma
phelma / wiki-mobile.user.js
Last active January 8, 2019 14:55
script for viewing mobile wikipedia on desktop
// ==UserScript==
// @name Wikipedia Desktop to mobile redirect
// @namespace phelm
// @version 0.1
// @description Load mobile page on desktop because it is easier to read
// @author phelm
// @include https://en.wikipedia.org/*
// @include http://en.wikipedia.org/*
// ==/UserScript==
find . -name '*.js' \
-exec grep -l '@jsx\|import.*react' {} \+ \
| xargs rename -v 's/\.js/\.jsx/'
@phelma
phelma / main.md
Created February 2, 2023 16:57
eevee-high-level

Eevee Core Basic usage (psuedocode)

Embedding an Entry

const entryId = 'abc123'

const evCoreState = await getEvCoreState({
 config,