Skip to content

Instantly share code, notes, and snippets.

@cconger
cconger / chandyman_v1.json
Created July 23, 2021 19:09
Preonic Keymap
{
"version": 1,
"notes": "",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "preonic/rev3",
"keymap": "chandyman_v1",
"layout": "LAYOUT_preonic_1x2uC",
"layers": [
[
"KC_GRV",
@cconger
cconger / stderr.0.5.3.log
Created August 21, 2019 16:57
Logging Improvement of-watchdog
2019/08/21 09:14:28 Started logging stdout from function.
2019/08/21 09:14:28 OperationalMode: http
2019/08/21 09:14:28 Writing lock-file to: /tmp/.lock
2019/08/21 09:14:28 Metrics server. Port: 8081
2019/08/21 09:14:28 Started logging stderr from function.
2019/08/21 09:14:28 stderr: 2019/08/21 09:14:28 Starting application server
This is a warning to stderr
2019/08/21 09:14:31 stderr: 2019/08/21 09:14:31 {"aczai":"nlqlibaatlyhdaopovfo","aereu":"nuzjqxmzotarlutmygms","akgza":"altlhtuzhjoxkmrnwkdo","albtz":"symgeudtrzqmdqiycohg","apvqq":"uqnzxsfbigfpkmldqolj","bcvfo":"httutuwjrgiqjotcvwhj","bhmbj":"ebvzwcjxyxloeteaketw","bqzge":"xyalbsdjs
2019/08/21 09:14:31 stderr: gpngcwfkdif","brwzk":"vdeannupkanborkcoqya","bzrjx":"awnwekrbemfdzdcekxba","cjymc":"wvxdrnsfurcfsvyszwtb","clvcx":"asjldsyeofkkeyeqkkhq","csist":"qduzsolezijiwmapkvat","djzye":"vvmsidsjekovpdqsnyns","dmneu":"iktxrinkszjaivxbrdrl","dritg":"uovpogatittvraedt

Keybase proof

I hereby claim:

  • I am cconger on github.
  • I am cconger (https://keybase.io/cconger) on keybase.
  • I have a public key ASAYzkHMJwm62JMTrSn5S92J2RxAbyv5qCQzdoT1s01mKwo

To claim this, I am signing this object:

@cconger
cconger / components.my-content.js
Created May 3, 2016 21:56
sendAction + closure Action
import Ember from 'ember';
export default Ember.Component.extend({
click() {
this.sendAction();
}
});
@cconger
cconger / lights.js
Last active January 13, 2016 07:52
A solution to Elevator Saga (http://play.elevatorsaga.com/)
{
DIRECTION: {
UP: 'up',
DOWN: 'down'
},
pendingFloors: [],
idleVators: [],
printPendingState: function() {
@cconger
cconger / Brocfile.js
Last active August 29, 2015 14:27
outputs a file with 70k lines of whitespace.
var sourcemapConcat = require('broccoli-sourcemap-concat');
module.exports = sourcemapConcat('./', {
outputFile: '/whitespace.js',
inputFiles: ['simpleapp.js', 'vendor.js']
});
@cconger
cconger / gist:6909930
Created October 9, 2013 22:55
Clean up an accidental unzip
#unzip -qqql $ZIPFILE
# -l lists all the files and directories in the zipfile without extracting them
# -qqq removes all the extra output (size summaries)
# tr -s ' '
# Removes the extra spaces which unzip uses to make the output human readable
# cut -d ' ' -f 5
# Splits the input on spaces and selecst the 5th element (the filename)
@cconger
cconger / onclickintercept.js
Created September 30, 2013 22:09
Intercept onclick handlers and wrap them with your own intercept code.
//Assume this was written before you got here.
document.body.onclick = function(){ alert(this) };
// Here's what you'd do.
function wrapper(elem, fn) {
return function() {
//You can put your intercept code here.
console.log('intercepted');
//Then call the original function with the usual arguments it would expect.
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:"http://127.0.0.1/test"];
[request setHTTPMethod:@"POST"];
[request setHTTPBody:[@"{json:goes, here:0}" dataUsingEncoding:nSUTF8StringEncoding]];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
NSURLConnection* conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];
[conn start];
@cconger
cconger / gist:1195926
Created September 5, 2011 21:07
Simple JS LRU Cache
var Node = function(Data)
{
//Reference to the next element (closer to the head)
this.next = null;
//Reference to the prev element (closer to the tail)
this.prev = null;
//The payload of the node (UserName in our example)
this.data = Data;
}