Skip to content

Instantly share code, notes, and snippets.

@Randommood
Randommood / opencv_v3.0.0_install_c++_project_.travis.yml
Created January 14, 2016 00:30 — forked from cgddrd/opencv_v3.0.0_install_c++_project_.travis.yml
Travis CI configuration file to install OpenCV v3.0.0 (beta) for use with C++ projects. Modified for v3.0.0 from original scripts available at: https://github.com/jayrambhia/Install-OpenCV.
language:
- cpp
compiler:
- gcc
before_install:
- sudo apt-get update
install:
@Randommood
Randommood / mount_gcp_disk.md
Last active August 28, 2015 00:15 — forked from yannvery/mount_gcp_disk.md
Mount GCP Disk

How to mount a disk on gcp compute instance

List all disks

df -k

Create directory where disk will be mount

sudo mkdir -p /data

Find hard drive to mount

You'll find it in this directory, this kind of disk is oftently call sdb

@Randommood
Randommood / fmtcomment
Last active August 29, 2015 14:18 — forked from jeddenlea/fmtcomment
#!/usr/bin/env python
"""
Select some text and then "!fmtcomment". It understands "//" and
"#" comments, works with indenting in spaces and tabs. It assumes
you want to squeeze your text within 80-chars, and treats tabs as
4 spaces thusly.
E.g., will turn
// Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
let(:runner) do
memoized_runner('pd-gocd::agent') do |node|
#.....
end
end
/* Exercise: Loops and Functions #43 */
package main
import (
"fmt"
"math"
)
func Sqrt(x float64) float64 {
z := float64(2.)
Bonnie Tyler - Total Eclipse of the Heart
Air Supply - Without You
Aerosmith - I Don't Want to Miss a Thing
No Doubt - Don't Speak
Toni Braxton - Un-Break My Heart
The Beatles - Hello Goodbye
Backstreet Boys - I want it that way
A whole new world
Whitney Houston - I Will Always Love You
Queen - The Show Must Go On
module SoftDelete
REQUIRED_PROPERTIES = [
[ :deleted_at, DataMapper::Property::DateTime ],
].freeze
def self.extended(klass)
REQUIRED_PROPERTIES.each do |property|
klass.send(:property, *property)
end
@Randommood
Randommood / emacs_intro
Last active December 20, 2015 02:59 — forked from dimitri/gist:6031799
Emacs Tutorial
* An Emacs Workshop for Beginners
It's all about discovering Emacs Really
** Install
*** Emacs 24.3
http://emacsformacosx.com/
http://emacs.naquadah.org/
http://ftp.gnu.org/pub/gnu/emacs/windows/
** Conventions and docs

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@Randommood
Randommood / riak_graphite_stats.sh
Created December 10, 2012 19:03 — forked from benmmurphy/riak_graphite_stats.sh
riak -> graphite stats cron job
#!/bin/bash
# * * * * * root /path/to/riak_graphite_stats.sh
set -e
SOURCE=$(hostname)
GRAPHITE_PORT=2003
GRAPHITE_SERVER="myserver"
PREFIX="test.riak"