Skip to content

Instantly share code, notes, and snippets.

View neocsr's full-sized avatar

Christian Sousa neocsr

  • Cupertino, CA
  • 13:52 (UTC -12:00)
View GitHub Profile
#include QMK_KEYBOARD_H
/* THIS FILE WAS GENERATED!
*
* This file was generated by qmk-compile-json. You may or may not want to
* edit it directly.
*/
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ergodox(KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LSFT, LCTL_T(KC_ESC), LT(2,KC_A), KC_S, KC_D, KC_F, KC_G, KC_LSFT, LT(1,KC_Z), KC_X, KC_C, KC_V, KC_B, KC_LSFT, KC_GRV, KC_DQUO, KC_LCTL, KC_LALT, KC_LGUI, LSFT(KC_LCTL), LCTL(KC_LGUI), KC_HOME, KC_BSPC, KC_TAB, KC_END, KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_RSFT, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(2,KC_SCLN), KC_QUOT, KC_RSFT, KC_N, KC_M, KC_COMM, KC_DOT, LT(1,KC_SLSH), KC_RSFT, KC_LGUI, KC_LCTL, KC_LBRC, KC_RBRC, TO(0), TO(1), TO(2), KC_PGUP, KC_PGDN, KC_ENT, KC_SPC),
{
"author": "neocsr",
"keyboard": "hotdox",
"keymap": "vim_space_tab_shift_mouse_no_arrows_toggle",
"layers": [
[
"KC_ESC",
"KC_1",
"KC_2",
"KC_3",
@neocsr
neocsr / clojure.md
Created January 4, 2014 09:51 — forked from rakhmad/clojure.md

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

Step 1: Getting Clojure (1.3)

@neocsr
neocsr / CustomView.rb
Created June 7, 2013 14:41
Random context drawing in RubyMotion
class CustomView < UIView
def gradient
if @gradient
puts "Reusing gradient..."
else
puts "Creating gradient..."
colors = Pointer.new(:float, 8)
colors[0], colors[1] = 0.0/255.0, 1.0
colors[2], colors[3] = 125.0/255.0, 1.0
// Implementing the publishing Pusher REST API
// @see http://pusher.com/docs/rest_api
// with Play (scala) Framework
// @see http://scala.playframework.org/
class Pusher {
val appId = Play.configuration.getProperty("pusher.appId")
val key = Play.configuration.getProperty("pusher.key")
val secret = Play.configuration.getProperty("pusher.secret")
@neocsr
neocsr / get_out_of_my_controller_spec.rb
Created December 8, 2012 17:45 — forked from adomokos/get_out_of_my_controller_spec.rb
The supporting code for my blog entry: "Get out of my Controller! And from Active Record, too!"
module ActiveRecord; class Base; end; end
# The AR Models Rails give you
class User < ActiveRecord::Base
# These fields are defined dynamically by ActiveRecord
attr_accessor :id, :full_name
end
class Discussion < ActiveRecord::Base
# These fields are defined dynamically by ActiveRecord
@neocsr
neocsr / DateTimeJavaScriptConverter.cs
Created October 12, 2012 01:13 — forked from johnnyreilly/DateTimeJavaScriptConverter.cs
The 3 elements needed to have a nice JavaScriptSerializer DateTime experience in older browsers and using ASP.NET WebForms
using System;
using System.Collections;
using System.Collections.Generic;
using System.Web.Script.Serialization;
namespace MyNamespace
{
/// <summary>
/// A custom DateTime JavaScriptConverter courtesy of these good folks: http://blog.calyptus.eu/seb/2011/12/custom-datetime-json-serialization/
/// Using this forces DataTimes to be serialised as ISO 8601 rather "\/Date(1249335477787)\/" style
@neocsr
neocsr / xkcdify.m
Created October 9, 2012 06:12
XKCDIFY! Redraw existing Matlab axes in an XKCD style
function xkcdify(axHandle)
%XKCDIFY redraw an existing axes in an XKCD style
%
% XKCDIFY( AXES ) re-renders all childen of AXES to have a hand drawn
% XKCD style, http://xkcd.com, AXES can be a single axes or a vector of axes
%
% NOTE: Only plots of type LINE and PATCH are re-rendered. This should
% be sufficient for the majority of 2d plots such as:
% - plot
% - bar
@neocsr
neocsr / heroku.rake
Created October 2, 2012 05:02 — forked from myronmarston/heroku.rake
Rake task to download a sql dump from a heroku app
namespace :heroku do
def app_name
@app_name ||= Heroku::Command::BaseWithApp.new([]).app
end
def latest_bundle(timeout = 30)
puts "Attempting to get latest bundle..."
get_bundle = lambda do
bundles = Heroku::Command.run('bundles', {})
bundles.sort { |b1, b2| b1[:created_at] <=> b2[:created_at] }
@neocsr
neocsr / install_graphite_statsd_ubuntu_precise.sh
Created September 28, 2012 18:33 — forked from bhang/install_graphite_statsd_ubuntu_precise.sh
Install Graphite and statsd on Ubuntu 12.04 LTS (Precise Pangolin)
#!/bin/bash
# node.js using PPA (for statsd)
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
# Install git to get statsd
sudo apt-get install git