Skip to content

Instantly share code, notes, and snippets.

@drjova
drjova / osx-for-hackers.sh
Created January 13, 2016 10:37 — forked from matthewmueller/osx-for-hackers.sh
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@drjova
drjova / angularjs_directive_attribute_explanation.md
Created January 5, 2016 09:04 — forked from CMCDragonkai/angularjs_directive_attribute_explanation.md
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
@drjova
drjova / index.html
Created December 17, 2015 10:27 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/kofule
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.0/angular.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<div ng-app="app">
<div ng-controller="invenioSearchController as vm">
@drjova
drjova / README.md
Created December 15, 2015 08:14 — forked from chriswessels/README.md
A guide to setting up self-hosted infrastructure for Meteor applications on Ubuntu Server 13.04.

#Meteor and Self-hosted Infrastructure

Meteor is an eye-opening JavaScript framework that runs on both the client and the server, giving developers a revolutionary take on software engineering. If you are not familiar with Meteor, I urge you to visit their website.

##An overview

In this brief gist, I am going to discuss the process of setting up a server (in my case, a VPS) to host Meteor applications.

My experience with Meteor has been brief, however it has not taken much demonstration for me to realise the significance of this stellar framework. Let's jump right in!

@drjova
drjova / README.md
Last active October 21, 2015 13:19
Create bootable OSX

Connect to your Mac a properly formatted 8GB (or larger) drive, and rename the drive Untitled. (The Terminal commands I provide here assume that the drive is named Untitled. If the drive isn’t named Untitled, the procedure won’t work.) Make sure the El Capitan installer (or at least a copy of it), called Install OS X El Capitan.app, is in its default location in your main Applications folder (/Applications). Select the text of the following Terminal command and copy it. sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction Launch Terminal (in /Applications/Utilities). Warning: This step will erase the destination drive or partition, so make sure that it doesn’t contain any valuable data. Paste the copied command into Terminal and press Return. Type your admin-level account password when prompted, and then press Return. You may see the message “To continue we need to era

@drjova
drjova / config.py
Last active August 26, 2016 13:52
Flask-IIIF custom cache example
# In your overlay's configuration (/s/overlay/YOUR_OVERLAY)
IIIF_CACHE_HANDLER = 'overlay.utils:FileSystemCache'
@drjova
drjova / patch.rb
Last active October 8, 2015 14:47
Fix mac external screen colors and blurry icons
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@drjova
drjova / The Technical Interview Cheat Sheet.md
Last active September 9, 2015 16:31 — forked from seanlane/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on a sequential index, most commonly 0 based.
  • Based on tuples from set theory.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname