Skip to content

Instantly share code, notes, and snippets.

Alvaro Muir alvaromuir

Block or report user

Report or block alvaromuir

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@alvaromuir
alvaromuir / Data-Science Linux Vagrant Box
Last active Aug 29, 2015
base data-science vagrant linux build
View Data-Science Linux Vagrant Box
# base data-science vagrant linux build
# last update, 9.28.14
# @alvaromuir
## Base installs ##
sudo yum -y update
sudo yum -y upgrade
sudo yum clean all
@alvaromuir
alvaromuir / buildxnu.sh
Created Jul 29, 2014
Build xnu (Darwin) kernel script
View buildxnu.sh
#!/usr/bin/env bash
#############################################
# Builds the latest xnu (Darwin) kernel #
# create a directory to do this in first!!! #
# it cleans the downloaded files after #
# ya homie, @alvaromuir #
#############################################
export PATH="/usr/local/bin:$PATH"
View keybase.md

Keybase proof

I hereby claim:

  • I am alvaromuir on github.
  • I am alvaromuir (https://keybase.io/alvaromuir) on keybase.
  • I have a public key whose fingerprint is B755 99EB 1371 531F 4C4F 815D 8134 38A3 DCE5 8212

To claim this, I am signing this object:

@alvaromuir
alvaromuir / heroku-setup.thor
Created Feb 9, 2014
Thor file that copies and install keys form a .heroku_config file in rails app root
View heroku-setup.thor
class Config < Thor
desc "heroku", "setup heroku from .heroku_config"
def heroku
puts "running Heroku config . . ."
config = ".heroku_config"
if File.exists?(config)
settings = File.open(config).read
settings.gsub!(/\r\n?/, "\n")
settings.each_line do |line|
@alvaromuir
alvaromuir / gist:8492876
Created Jan 18, 2014
Social Web App idea #MLKDreamCode
View gist:8492876
Yelp meets kickstarter for social good.
People should be able to post information and images about things they want to change in their community.
Requires social login to ensure the word is spread
Gamaified by karma points.
Gains attention of local governing bodies, community members, neighbors
@alvaromuir
alvaromuir / obj-c_marcos
Created Jan 5, 2014
Some common Objective-C Macros
View obj-c_marcos
#define PI 3.141592654
#define TWO_PI 2.0 * PI
#define SQUARE(x) ((x)*(x))
#define CUBE(x) ((x)*(x)*(x))
#define IS_LEAP_YEAR(y) y % 4 == 0 && y % 100 != 0 || y % 400 == 0
#define IS_LOWER_CASE(x) ( ((x) >= 'a') && ((x) <= 'z'))
#define TO_UPPER(x) (IS_LOWER_CASE(x) ? (x) - 'a' + 'A': (x))
#define INCHES_PER_CENT 0.394
#define CENT_PER_INCH (1/INCHES_PER_CENT)
View snippets
// Remove timestamp from NSLog
#define NSLog(FORMAT, ...) printf("%s\n", [[NSString stringWithFormat:FORMAT, ##__VA_ARGS__] UTF8String]);
@alvaromuir
alvaromuir / Ordinals.py
Last active Dec 30, 2015
Python Ordinals
View Ordinals.py
def ordinal(n):
if 4 <= n <= 20 or 24 <= n <= 30:
return n + 'th'
else:
return str(n) + ["st", "nd", "rd"][n % 10 - 1]
View _custom.scss
// Colors:
$TURQUOISE: #1abc9c;
$GREENSEA: #16a085;
$EMERALD: #2ecc71;
$NEPHRITIS: #27ae60;
$PETERRIVER: #3498db;
$BELIZEHOLE: #2980b9;
$AMERGYST: #9b59b6;
$WISTERIA: #8e44ad;
$WETASPHALT: #34495e;
@alvaromuir
alvaromuir / TumblrDemo.html
Last active Dec 25, 2015
Tumblr demo in html, sans js or iframes.
View TumblrDemo.html
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Alvaro Muir | Thought You'd Wanna Know</title>
<meta name="description" content="Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.">
<link rel="shortcut icon" href="http://assets.tumblr.com/images/default_avatar_128.png">
You can’t perform that action at this time.