Skip to content

Instantly share code, notes, and snippets.

Avatar

Miguel Araujo miguelarauj1o

View GitHub Profile
@miguelarauj1o
miguelarauj1o / springer-free-maths-books.md
Created Dec 29, 2015 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links
View preprocces.py
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()
View pypi-release-checklist.md
  • 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 Jan 14, 2016 — 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...
View osx-for-hackers.sh
#!/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'
View api-json.playground
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 Feb 10, 2016 — forked from kristopherjohnson/minReduce.swift
Using Swift reduce() and min() to find minimum value in an array
View minReduce.swift
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 Apr 7, 2016 — forked from mbinna/podforceupdate.sh
Clear CocoaPods cache, re-download and re-install all pods
View podforceupdate.sh
#!/usr/bin/env bash
rm -rf "${HOME}/Library/Caches/CocoaPods"
rm -rf "`pwd`/Pods/"
pod update
@miguelarauj1o
miguelarauj1o / NSString+Random.h
Created Apr 7, 2016 — forked from mdippery/NSString+Random.h
Generate random strings in Objective-C
View NSString+Random.h
/*
* 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 Apr 21, 2016 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX
View .profile
# 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
@miguelarauj1o
miguelarauj1o / # alluxio - 2016-08-23_15-46-47.txt
Created Aug 23, 2016
alluxio on Mac OS X 10.11.6 - Homebrew build logs
View # alluxio - 2016-08-23_15-46-47.txt
Homebrew build logs for alluxio on Mac OS X 10.11.6
Build date: 2016-08-23 15:46:47