Skip to content

Instantly share code, notes, and snippets.

View omeid's full-sized avatar

Omeid omeid

  • Sydney, Australia
View GitHub Profile
@omeid
omeid / efficiencies.md
Created October 31, 2019 23:12
Death By A Thousand Efficiencies: Why You Too Should Be Afraid of Automation

Death By A Thousand Efficiencies: Why You Too Should Be Afraid of Automation

When the question of “automation caused job losses” comes up, most people think of industry jobs where production-line or humanoid robots take over jobs whole or at most talk about virtual assistants or other entry level knowledge-worker positions getting replaced by Artificial Intelligence or how Neural Networks can compose news articles from a set of facts; the common theme here is bots taking over jobs whole; while ‘bots taking over jobs at the production-line is old news and vending machines that replace pizza restaurants from the cashier to chef is no longer something to speculate, I think a much more deadly and silent job killer is often overlooked: tools that makes workers more efficient.

As a general rule, efficiencies that reduces work-hours by any given percentage, it also reduces the overall number of position by the same percentage.

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@omeid
omeid / accesscontrol.go
Last active August 29, 2015 14:17
Go API middleware handler.
package api
import (
"net/http"
"github.com/ORG/PROJECT/user"
)
func accessControl(level user.AccessLevel) func(handler) handler {
return func(handler handler) handler {
@omeid
omeid / express.go
Last active August 29, 2015 14:09
Node.js (Express) Style Go Middleware in 40 line of code.
package main
import (
"log"
"net/http"
"time"
)
type Handler func(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
@omeid
omeid / gcc-4.7.3-musl-1.patch
Created October 30, 2014 02:16
GCC 4.7.3 Musl-1 Patch.
Submitted By: Andrew Bradford <[email protected]>
Date: 2013-10-14
Initial Package Version: 4.7.3
Origin: Gregor Richards' musl-cross
Upstream Status: None
Description: Patches to gcc to build for musl-libc.
# HG changeset patch
# Parent f50bb54f331f73405131a30b4f353cfda1c70304
Use the generic implementation of libstdc++ primitives when we're on musl, not the glibc one.
@omeid
omeid / css.vim
Created August 26, 2014 13:42 — forked from tpope/css.vim
" Vim indent file
" Language: CSS
" Maintainer: Nikolai Weibull <[email protected]>
" Latest Revision: 2010-12-22
if exists("b:did_indent")
finish
endif
let b:did_indent = 1
@omeid
omeid / output.go
Last active August 29, 2015 14:04
Concept: Martini like Go Meta Framework Using Code Generation.
package main
import (
"fmt"
"log"
"net/http"
"github.com/gorilla/mux"
)
@omeid
omeid / util.go
Last active August 29, 2015 14:04
Golang utils for copypasta.
package main
import (
"crypto/md5"
"crypto/rand"
"encoding/hex"
"encoding/json"
"io"
"net/http"
)
@omeid
omeid / gist:b2c8e7186a99771b0fbb
Created July 27, 2014 17:39
Go Martin Angular.js html5 urls.
package main
import(
"fmt"
"github.com/go-martini/martini"
)
func main() {
m := m := martini.Classic();
m.NotFound(func(w http.ResponseWriter, r *http.Request) {
@omeid
omeid / vm.sh
Created December 1, 2013 10:08
VirtualBox Manager
#!/bin/bash
function vm {
function vm_status {
return $(vboxmanage list runningvms | grep "$1" &> /dev/null);
}
function vm_start {
vboxheadless -s "$1" &> /dev/null & echo "Server is going up..."
# VBoxManage startvm "$1" --type headless &> /dev/null & echo "Server is going up..."