This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# | |
# Functions | |
# | |
# | |
# Check if Photograph is Square | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yaml' | |
# | |
# Consts | |
# | |
PROG_VERSION = '1.0.0' | |
PROG_NAME = 'add_locale_string' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function fizzbuzz(number, max) { | |
var fizz = ''; | |
number = number || 1; | |
max = max || 100; | |
if (!(number % 5)) { | |
fizz += 'fizz'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am bhalash on github. | |
* I am bhalash (https://keybase.io/bhalash) on keybase. | |
* I have a public key whose fingerprint is 865A D7F1 E2EA F5C7 F5B0 3883 E757 1B1D DDDE 23C3 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($, document, window) { | |
/** | |
* Event subscribe/unsubscribe. | |
* | |
* @link https://davidwalsh.name/pubsub-javascript | |
* @link https://gist.github.com/cowboy/661855 | |
*/ | |
$.observer = $({}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var sorter = function(a, b) { | |
if (a < b) { | |
return -1; | |
} | |
if (b == a) { | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Super-duper simple explanation of jQuery's pub/sub model. | |
* See: https://gist.github.com/cowboy/661855 | |
* See: https://github.com/cowboy/jquery-tiny-pubsub | |
*/ | |
/* | |
* 1. Pass DOM element to jQuery and save the instance as a variable. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Gallery, row, and img classes. | |
// UPDATE GALLERY.CSS IF YOU CHANGE THESE!!!! | |
var customClass = '.funcan'; | |
var galleryClass = customClass + '-gallery'; | |
var rowClass = customClass + '-row'; | |
var lightboxClass = customClass + '-lightbox'; | |
// Lightbox div elements. | |
var lightboxElements = [ | |
lightboxClass + '-close', | |
lightboxClass + '-nav', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Observer Test</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<table id="people"> | |
<thead> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
public class AskDate { | |
public static void main(String args[]) { | |
Date today = new Date(); | |
Date birthday = stringToDate("May 8, 1981"); | |
// Date birthday = stringToDate("April 23, 2016"); | |
System.out.println(today); |