Skip to content

Instantly share code, notes, and snippets.

View alanhg's full-sized avatar
⌨️
Focusing

Alan.He alanhg

⌨️
Focusing
View GitHub Profile
@jaysonrowe
jaysonrowe / FizzBuzz.js
Created January 11, 2012 01:39
FizzBuzz JavaScript solution
for (var i=1; i <= 20; i++)
{
if (i % 15 == 0)
console.log("FizzBuzz");
else if (i % 3 == 0)
console.log("Fizz");
else if (i % 5 == 0)
console.log("Buzz");
else
console.log(i);
@JavierParra
JavierParra / radialBattery.sh
Created September 8, 2011 06:38
Displays the battery status of your devices, designed to be used with GeekTool
##################################################################
# YOU NEED IMAGE MAGICK TO RUN THIS #
# DON'T FORGET TO CONFIGURE THE FIRST FEW LINES OF THIS FILE #
##################################################################
# Usage
# 1st - Run this script as a shell geeklet.
#
# You need to pass one of the following parameters:
# ·trackpad
@jehiah
jehiah / simple_args_parsing.sh
Created March 4, 2011 16:56
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"