Skip to content

Instantly share code, notes, and snippets.

View amaranter's full-sized avatar

Ronny Amarante amaranter

View GitHub Profile
@amaranter
amaranter / my_osx_preferences.sh
Created November 24, 2018 07:51
My Personal OSX Preferences
#!/usr/bin/env bash
### FINDER
# Hide icons for hard drives, servers, and removable media on the desktop
defaults write com.apple.finder ShowHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowExternalHardDrivesOnDesktop -bool false
defaults write com.apple.finder ShowRemovableMediaOnDesktop -bool false
defaults write com.apple.finder ShowMountedServersOnDesktop -bool false
@amaranter
amaranter / MerkleTree.js
Created August 13, 2017 21:51
Merkle Tree Implementation with Javascript and CryptoJS (SHA-256)
/**
* MerkleTree Implementation
* @version 1.0.0
* @author Ronny Amarante <me@amaranter.com>
*/
var SHA256 = require("crypto-js/sha256");
function MerkleTree(transactions) {
this.transactions = transactions;
@amaranter
amaranter / gist:20a6429602dc1456c1c7
Created October 24, 2015 22:36
Mobile Boilerplate

###Conditional comment for Window Phone 7

<!--[if IEMobile 7 ]>    <html class="no-js iem7" manifest="default.appcache?v=1"...> <![endif]-->
<!--[if (gt IEMobile 7)|!(IEMobile)]><!--> <html class="no-js"...> <!--<![endif]-->

Conditional comment to add class iem7 for Window Phone 7

###Mobile viewport optimization

#!/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'