Skip to content

Instantly share code, notes, and snippets.

View kamiro's full-sized avatar

Gary Morrison kamiro

View GitHub Profile
@kamiro
kamiro / erlang-elixir-on-amazon-linux.md
Created July 26, 2017 21:20 — forked from techgaun/erlang-elixir-on-amazon-linux.md
Running elixir 1.4 on amazon linux

pre-install

yum install ncurses-devel openssl-devel

install erlang

yum groupinstall "Development Tools"
wget "http://erlang.org/download/otp_src_19.3.tar.gz" -O otp19.tar.gz
tar xfz otp19.tar.gz
cd otp_src_19.3/
./configure

make && make install

@kamiro
kamiro / Makefile
Last active August 29, 2015 14:27 — forked from bewest/Makefile
medtronic symbol table
CC=gcc
CFLAGS=-lm -pthread
rtl_mmpump: rtl_mmpump.c
# xxx: gcc ./rtl_mmpump.c -pthread -lm $(pkg-config --libs --cflags libusb-1.0 librtlsdr)
$(CC) -o $@ $< $(CFLAGS) $(shell pkg-config --libs --cflags libusb-1.0 librtlsdr)
all: rtl_mmpump

Branches

list branches
git branch [-a to include remote branches]

create branch [from master]
git checkout -b HS-1234 [master]

update master, rebase and push
git checkout master

#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
#pragma mark -
#pragma mark CGFloat
#pragma mark Trigonometric Functions
#define CGFloatCos(a) (CGFLOAT_IS_DOUBLE ? cos(a) : cosf(a))
#define CGFloatSin(a) (CGFLOAT_IS_DOUBLE ? sin(a) : sinf(a))
#define CGFloatTan(a) (CGFLOAT_IS_DOUBLE ? tan(a) : tanf(a))
#define CGFloatACos(a) (CGFLOAT_IS_DOUBLE ? acos(a) : acosf(a))
#define CGFloatASin(a) (CGFLOAT_IS_DOUBLE ? asin(a) : asinf(a))
#define CGFloatATan(a) (CGFLOAT_IS_DOUBLE ? atan(a) : atanf(a))
@kamiro
kamiro / Encbox.md
Created July 21, 2013 22:16 — forked from Tho85/Encbox.md

Build your own private, encrypted, open-source Dropbox-esque sync folder

Prerequisites:

  • One or more clients running a UNIX-like OS. Examples are given for Ubuntu 12.04 LTS, although all software components are available for other platforms as well (e.g. OS X). YMMV
  • A cheap Ubuntu 12.04 VPS with storage. I recommend Backupsy, they offer 250GB storage for $5/month. Ask Google for coupon codes.

Software components used:

  • Unison for file synchronization
  • EncFS for folder encryption
@kamiro
kamiro / gist:3902122
Created October 16, 2012 21:21 — forked from rsattar/gist:1896546
RegexKitLite's arrayOfCaptureComponentsMatchedByRegex: written using NSRegularExpression
// I had a need to replace the use of RegexKitLite's arrayOfCaptureComponentsMatchedByRegex with
// the built-in NSRegularExpression in iOS 5+, and didn't find an existing example, so I wrote one:
- (NSArray *) arrayOfCaptureComponentsOfString:(NSString *)data matchedByRegex:(NSString *)regex
{
NSError *error = NULL;
NSRegularExpression *regExpression = [NSRegularExpression regularExpressionWithPattern:regex options:NSRegularExpressionCaseInsensitive error:&error];
NSMutableArray *test = [NSMutableArray array];