Skip to content

Instantly share code, notes, and snippets.

@rektide
rektide / gist:4684846
Created January 31, 2013 17:59
mysql creating a user
mysql> create user 'foo'@'%' identified by 'apass';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
~/$ mysql -u foo -p
@rektide
rektide / .config
Last active December 12, 2015 05:48
attempted openwrt compile 2013.2.6
CONFIG_32BIT=y
# CONFIG_6PACK is not set
CONFIG_8139CP=m
CONFIG_8139TOO=m
# CONFIG_8139TOO_8129 is not set
CONFIG_8139TOO_PIO=y
# CONFIG_8139TOO_TUNE_TWISTER is not set
# CONFIG_8139_OLD_RX_RESET is not set
# CONFIG_9P_FS is not set
# CONFIG_AB3100_CORE is not set
@rektide
rektide / dbus.cc
Created February 16, 2013 20:03
cannot convert 'ev_loop*' to '__ev_io*'
LINE 790: static dbus_bool_t addWatch(DBusWatch *watch, void *data) {
ev_io* io = new ev_io();
ev_io_init(io, watchCallback, dbus_watch_get_unix_fd(watch), EV_READ | EV_WRITE);
io->data = watch;
dbus_watch_set_data(watch, io, freeWatchData);
configureWatch(watch);
ev_io_start(ev_default_loop(0), io);
return true;
};
@rektide
rektide / gist:4978744
Last active December 13, 2015 21:38
List of JavaScript Package Management/Cross-platform Utils
npm
Browserify
Bower
Volo
Require.js
Require
jam
component
onejs
Ender
@rektide
rektide / gist:4988136
Created February 19, 2013 17:45
retrieve x2go key
gpg --keyserver keys.gnupg.net --no-default-keyring --keyring /tmp/tmp.syKbYrVBAr --recv-keys E1F958385BFE2B6E
gpg: requesting key 5BFE2B6E from hkp server keys.gnupg.net
gpg: key 5BFE2B6E: public key "X2go Debian/Ubuntu Packaging <debian@x2go.org>" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
gpg: WARNING: nothing exported
@rektide
rektide / ioc.list
Last active December 14, 2015 02:39
List of JS IoC containers
Intravenous
Rewire
Broadway
Ettore
Wire
Summer
Splink
Sanders
Registry
Overdose
@rektide
rektide / writing-code.md
Last active December 15, 2015 13:18
Promises are about Getting Rid of a Phase Distinction - A crude guide to what makes Promises Actually Different than every other tool.

A promise is a value, and values are by definition not machines.

Phase Distinctions, Machines, Higher Order Functions,

Tools for composing systems

In CS: a phase distinction is a boundary code goes through on it's way to being run. We write the prime artifact, "the code," but to run a machine, this code is transformed by machines, often many machines transforming, taking whatever the current code is, making decisions about what that code looks like, what it represents, and outputting a new code closer to the final execution target. This is the compilation pipeline goes go through to get executed on the target machine. Phase distinction is applied to types, as types change as code goes through the pipeline, but in general all aspects of the code are going through phasal distinctions as they become closer to being run.

Higher order functions: composing complexity

Async- the most popular library on the planet for helping to deal with functional programming- is a library dedicated to composing functio

TASK: [file path=/srv/${NAME.stdout}/ state=directory mode=770] ***************
fatal: [127.0.0.1] => Traceback (most recent call last):
File "/home/rektide/archive/ansible/lib/ansible/runner/__init__.py", line 320, in _executor
exec_rc = self._executor_internal(host)
File "/home/rektide/archive/ansible/lib/ansible/runner/__init__.py", line 374, in _executor_internal
items = utils.plugins.lookup_loader.get(items_plugin, runner=self, basedir=self.basedir).run(items_terms, inject=inject)
File "/home/rektide/archive/ansible/lib/ansible/runner/lookup_plugins/items.py", line 43, in run
terms = template.template(self.basedir, terms, inject)
File "/home/rektide/archive/ansible/lib/ansible/utils/template.py", line 255, in template
varname = template_from_string(basedir, varname, vars)
@rektide
rektide / cc.md
Created July 15, 2013 09:46
Chain of Command, the: Receiver-side Handling A Generalized First Class Model of Context Passing Processing

Of execution

Programmers often regard executing a function as the same as a method call, yet: a function is a distinct operation being called, a receivership, and a method call is the sender asking for it's associate operation, whatever that may be at the time, to be run: we may change the function on on an object's slot in a dynamic language, for example, yet the method calling will often remain the same.

Of type-based multimethod dynamic dispatch

Multimethods are a means of handling dispatch at runtime (dynamically) based upon the type of arguments. Instead of assigning a single function for a method, it assigns multiple function implementations, each guarded by a check of types: whatever we call the method with must pattern match with an available known function. Frequently no code needs to be written for multimethods aside from the function implementations: strong typing of the function definition is fed in to a runtime decision tree that does the selection whenever a method is invoked. The r

@rektide
rektide / promiseQueue.md
Last active December 20, 2015 01:58
Queue of Promises

Promise Callbacks

callback AnyCallback = any (optional any value);

is how promise callbacks work now

it signifies a value is ready

Stream Callbacks