Skip to content

Instantly share code, notes, and snippets.

View miguelarauj1o's full-sized avatar
🎯
Focusing

Miguel Araujo miguelarauj1o

🎯
Focusing
View GitHub Profile
@miguelarauj1o
miguelarauj1o / springer-free-maths-books.md
Created December 29, 2015 20:36 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
import os
def filterAlpha(a):
return a.isalpha()
def generate(size) :
# files = ['desolation-row.txt', 'english.txt', 'storm-of-swords.txt', 'communist-manifesto.txt']
f = open('english.txt', 'r')
o = open('english'+str(size)+'.txt', 'w')
lines = f.readlines()
  • Update HISTORY.rst
  • Commit the changes:
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@miguelarauj1o
miguelarauj1o / osx-for-hackers.sh
Created January 14, 2016 22:38 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most 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'
@miguelarauj1o
miguelarauj1o / api-json.playground
Created February 3, 2016 00:38 — forked from jeffdonthemic/api-json.playground
Swift API call & parsing JSON
import Foundation
import XCPlayground
XCPSetExecutionShouldContinueIndefinitely()
/**
* Paste all the code from the following file
- https://github.com/lingoer/SwiftyJSON/blob/master/SwiftyJSON/SwiftyJSON.swift
**/
@miguelarauj1o
miguelarauj1o / minReduce.swift
Created February 10, 2016 21:23 — forked from kristopherjohnson/minReduce.swift
Using Swift reduce() and min() to find minimum value in an array
struct Value {
let num: Int
init(_ n: Int) { num = n }
}
let a = [Value(3), Value(2), Value(1), Value(4), Value(5)]
let min1: Value = a.reduce(Value(Int.max)) {
($0.num < $1.num) ? $0 : $1
@miguelarauj1o
miguelarauj1o / podforceupdate.sh
Created April 7, 2016 19:37 — forked from mbinna/podforceupdate.sh
Clear CocoaPods cache, re-download and re-install all pods
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@miguelarauj1o
miguelarauj1o / NSString+Random.h
Created April 7, 2016 20:27 — forked from mdippery/NSString+Random.h
Generate random strings in Objective-C
/*
* Copyright (C) 2011 Michael Dippery <mdippery@gmail.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@miguelarauj1o
miguelarauj1o / .profile
Created April 21, 2016 14:01 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else

Videos