Skip to content

Instantly share code, notes, and snippets.

Joshua Ballanco jballanc

Block or report user

Report or block jballanc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View .vimrc
set nocompatible " We're running Vim, not Vi!
syntax on " Enable syntax highlighting
filetype off " Disable filetype detection to keep Vundle happy
set shiftwidth=2 " That's a good tab width
set expandtab " ...and we don't like tab chars
set softtabstop=2
set tw=90 " 90 chars fits two columns on my screen
set wrap
set fdm=syntax " Use syntax to define folding
set fdls=99 " ...but start off unfolded
View spacemacs.el
;; -*- mode: dotspacemacs -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration."
(setq-default
;; List of additional paths where to look for configuration layers.
;; Paths must have a trailing slash (ie. `~/.mycontribs/')
dotspacemacs-configuration-layer-path '()
View interview.md

Personally, when conducting technical interviews, I try to keep the interviewee right at the limits of their knowledge and ability. It's sort of like standing blindfolded in a room and walking in different directions until you hit a wall to get a sense of the size of the room (don't try this at home). So this often involves starting overly complex, then walking back until you find the interviewee's comfort zone. Let them demonstrate their knowledge for a while (and hopefully gain back some confidence), then push them out to the complexity zone again until they stop answering/start looking uncomfortable again.

To give a concrete example of what that would look like with this question (let's call "A" the interviewer and "B" the interviewee):

A: Thanks for coming in today! We here at CompuMegaCorp are glad you decided to interview with us, and personally, I hope you're enjoying the day so far...

B: Uh...yeah (shifts nervously in seat)

A: Great! So, for the projects you'd be working on here, we make heavy use

View gist:745a88240e30929cfc01
> mkdir -p foo/src/foo
> cd foo
> echo "(ns foo.core (:gen-class)) (defn -main [& args] (println \"Hello, world\"))" > src/foo/core.clj
> boot -s src pom -p foo -v 0.1.0 jar -m foo.core
Writing pom.xml and pom.properties...
Writing foo-0.1.0.jar...
> java -jar target/foo-0.1.0.jar
Error: Could not find or load main class foo.core
> boot -s src pom -p foo -v 0.1.0 uber jar -m foo.core
Writing pom.xml and pom.properties...
View -
59CGHPjM$X]r+n38WYp<KVD4z!1&0`u
View crash.jl
function f(x)
if x > 0
unshift!(f(x-1), 1)
else
[1]
end
end
function crash(low, i, high)
try
@jballanc
jballanc / flatteno.clj
Last active Jan 2, 2016
Utility functions for Clojure's core.logic that can unwrap or flatten an arbitrarily deeply nested list (or list of lists).
View flatteno.clj
(ns core.logic.util.flatteno
(:require [clojure.core.logic :as cl]))
(cl/defna unwrapo
"Unwrapps an arbitrarily deeply nested list"
[l o]
([[e] o]
(unwrapo e o))
([[f . r] o]
(cl/conso f r o)))
View arrow.js
// So, ECMAScript 6 Harmony arrow_function_syntax says:
// ----8<----8<----8<----
// ''=>'' has only lexical ''this'', no dynamic ''this''
const obj = {
method: function () {
return () => this;
}
};
assert(obj.method()() === obj);
View main.c
#include <stdlib.h>
#include <stdio.h>
#include <luajit-2.0/lua.h>
#include <luajit-2.0/lualib.h>
#include <luajit-2.0/lauxlib.h>
#include "main.h"
#define CHECK_LOADED(i) if(i) {\
fprintf(stderr, "Problem loading: %s\n",\
lua_tostring(L, -1));\
View sample_controller.rb
class SampleController < UIViewController
def viewDidLoad
super
self.view.backgroundColor = UIColor.whiteColor
frame = UIScreen.mainScreen.applicationFrame
origin = frame.origin
size = frame.size
text_view = UITextView.alloc.initWithFrame([[origin.x, origin.y],
You can’t perform that action at this time.