Skip to content

Instantly share code, notes, and snippets.

View loadx's full-sized avatar

Mat Brennan loadx

  • Melbourne, Australia.
View GitHub Profile
@loadx
loadx / racer.py
Created May 2, 2018 15:38
concurrency examples
import asyncio
import timeit
from functools import partial
from multiprocessing import Pool
from test_multi_sock import print_at_interval, print_at_async_interval
runs = 10
sample_vals = ["hello", "world", "done"]
loop = asyncio.get_event_loop()
@loadx
loadx / controllers.application.js
Created November 10, 2017 08:39
test-service-binding
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@loadx
loadx / gist:40b5c105de502fe5526a
Last active August 29, 2015 14:07
windows bashrc
# override $SHELL
export SHELL=$(which zsh)
# COLORS
alias ls='ls -G --color=auto'
alias ll='ls -hl --color=auto'
alias stree='CPAU -u au\brennanm -p password -ex "C:\Program Files (x86)\Atlassian\SourceTree\SourceTree.exe"'
alias open='/cygdrive/c/windows/explorer.exe'
# enables color
@loadx
loadx / -
Created August 10, 2014 12:57
# basic settings
set -g default-terminal "screen-256color"
setw -g xterm-keys on
set -g base-index 0
set -s escape-time 0
setw -g mode-mouse off
# bindings
# first rebind prefix
unbind C-b
# ~/.tmuxinator/afamux.yml
name: afamux
root: ~/V3/v3_source
# Optional tmux socket
# socket_name: foo
# Runs before everything. Use it to start daemons etc.
pre: cd ~/V3/chef; be kitchen converge web
@loadx
loadx / deps.txt
Created December 3, 2013 04:40
This is why we can't have nice things
--- /Users/loadx/Desktop/before.txt 2013-12-03 15:34:03.000000000 +1100
+++ /Users/loadx/Desktop/after.txt 2013-12-03 15:34:43.000000000 +1100
@@ -1,4 +1,47 @@
/usr/local/lib
+├─┬ learnyounode@0.2.16
+│ ├─┬ bl@0.4.2
+│ │ └── readable-stream@1.0.17
+│ ├── boganipsum@0.1.0
+│ ├─┬ concat-stream@1.0.1
+│ │ └─┬ bops@0.0.6
@loadx
loadx / gist:7667431
Created November 26, 2013 22:25
new jshint errors
No .jshintrc file
vagrant@web-and-db-ubuntu-1204:/fs/ember$ brunch b
.jshintrc parsing error: no such file or directory '/fs/ember/.jshintrc'. jshint will run with default options.
26 Nov 22:20:02 - error: Linting of 'app/app.js' failed. 'import' is only available in ES6 (use esnext option). (error) at line 1, column 1
'import' is only available in ES6 (use esnext option). (error) at line 2, column 1
'export' is only available in ES6 (use esnext option). (error) at line 25, column 1 ; Linting of 'app/router.js' failed. 'export' is only available in ES6 (use esnext option). (error) at line 7, column 1 ; Linting of 'app/models/brokers.js' failed. 'export' is only available in ES6 (use esnext option). (error) at line 14, column 1 ; Linting of 'app/routes/index.js' failed. 'import' is only available in ES6 (use esnext option). (error) at line 1, column 1
'export' is only available in ES6 (use esnext option). (error) at line 10, column 1
With .jshintrc but bad syntax
@loadx
loadx / style.css
Created December 18, 2012 00:30
Koding giveaway removing absolutes
ul#items li {
background-color: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.16);
border-radius: 8px 8px 8px 8px;
box-shadow: 0 0 150px rgba(0, 0, 0, 0.32);
float: left;
height: auto;
margin: 0 15px 15px 0;
padding: 20px;
position: relative;
@loadx
loadx / preferences.sublime
Created November 15, 2012 00:47
Sublime User settings
{
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"draw_white_space": "all",
"font_face": "Source Code Pro",
"font_size": 12.0,
"ignored_packages":
[
"Vintage"
],
"theme": "Soda Dark.sublime-theme",
@loadx
loadx / gist:4069289
Created November 14, 2012 00:08
Ember-data server side validation without deadlocking the record as 'invalid'
App.AddContactController = Em.ArrayController.extend({
init: function(){
this.companies = App.store.findAll(App.Company);
},
beginEdit: function(){
// By default createRecord will add this to the ArrayProxy and it will be rendered
// this property allows us to toggle rendering
this.set('record', App.store.createRecord(App.Contact, {'visible': false}));
},