Skip to content

Instantly share code, notes, and snippets.

View rastasheep's full-sized avatar

Aleksandar Diklic rastasheep

View GitHub Profile
@rastasheep
rastasheep / cv.md
Created September 10, 2012 00:59
Aleksandar Diklić

Ribnjak Donji Put 91, Novi Sad, Serbia | +381 (0) 63 7321 741 | rastasheep@gmail.com

Born

Male, 27.12.1991 in Novi Sad, Serbia

Education

2010 - present
University of Novi Sad, Faculty of Siences

@rastasheep
rastasheep / gist:3724290
Created September 14, 2012 19:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts (Linux/Windows)

General

  • Ctrl + P | go to anything
  • Ctrl + R | go to methods
  • Ctrl + G | go to line
  • Ctrl + UP / DOWN | scroll up and down
  • Ctrl + KB | toggle side bar
  • Ctrl + ⇧P | command prompt
  • Ctrl + ⇧N | new window (useful for new project)
@rastasheep
rastasheep / gist:3965718
Created October 27, 2012 19:06
Debian guide to install rvm, ruby and ruby on rails

This guide will go through installing the RVM (Ruby Version Manager), then a version of Ruby (1.9.3), then Rails and finally Bundler, and is specifically written for a development environment on Debian based systems.

note

Under no circumstance should you install Ruby, Rubygems or any Ruby-related packages from apt-get. This system is out-dated and leads to major headaches. Avoid it for Ruby-related packages.

We do Ruby, we know what's best. Trust us.

Housekeeping

First of all, we’re going to run sudo apt-get update so that we have the latest sources on our box so that we don’t run into any package-related issues, such as not being able to install some packages.

@rastasheep
rastasheep / markdown.md
Created December 10, 2012 02:18
MiniTest quick reference

MiniTest::Spec

use must for positive expectations and wont for negative expectations.

  • must_be | list.size.must_be :==, 0
  • must_be_close_to | subject.size.must_be_close_to 1,1
  • must_be_empty | list.must_be_empty
  • must_be_instance_of | list.must_be_instance_of Array
  • must_be_kind_of | list.must_be_kind_of Enumerable
@rastasheep
rastasheep / compressed.js
Created December 11, 2012 00:32
Tubalr bookmarklet
javascript:((function(){var a=window.location.search.split('v=')[1];var b=a.indexOf('&');if(b!=-1){a=a.substring(0,b)}window.location=" http://www.tubalr.com/video/"+a})())
@rastasheep
rastasheep / gist:4626539
Last active December 11, 2015 16:18
Get app Info API
require 'httpclient'
c = HTTPClient.new
c.set_auth("https://api.heroku.com/apps/:name", ":user", ":password")
p c.get("https://api.heroku.com/apps/:name")
#Test commit
@rastasheep
rastasheep / install_go.sh
Last active December 19, 2015 23:49
Little script for installing go lang.
#!/bin/bash
# Stuff we need: bison, gcc, libc6-dev, ed, gawk, mercurial
# Folder for go instalation
mkdir ~/go
hg clone -r release https://go.googlecode.com/hg/ ~/go
export PATH=~/go/bin:$PATH
package main
import (
"database/sql"
"errors"
"fmt"
_ "github.com/bmizerany/pq"
"os"
"regexp"
"strings"
@rastasheep
rastasheep / go_project_code_layout.md
Created July 28, 2013 15:58
How to organize a multi-package golang application hosted on Github.

Introduction

A common use case is to create a reusable library and an application that consumes it, and host both on Github. We will illustrate this with a trivial application called "uselessd" that consumes a likewise trivial library called "useless".

Code Layout

The app and both libraries live on Github, each in its own repository.

@rastasheep
rastasheep / gist:6172376
Created August 7, 2013 08:51
default finder options
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Application-Group</key>
<string>dot-mac</string>
<key>BuildMachineOSBuild</key>
<string>11E53</string>
<key>CFAppleHelpAnchor</key>
<string>apdED8125EF-CC33-4434-A1E7-5923608D5CE1</string>