This file contains hidden or 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
| # See: http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html | |
| # See: http://jonas.nitro.dk/tig/tigrc.5.html | |
| # | |
| # Area Foreground Background Options | |
| # ============================================================================== | |
| # Main UI | |
| # ============================================================================== | |
| color default 250 234 | |
| color 'Author ' 15 default |
This file contains hidden or 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 | |
| # http://rubular.com/r/2Z6twnqiB7 | |
| # http://rubyfiddle.com/riddles/d4d27 | |
| only_letters_regex = /^[A-Za-z]+$/ | |
| evil_string = 'Good | |
| 123456789 | |
| "1" = "1"))/* |
This file contains hidden or 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
| add_filter('the_content', function($content) { | |
| $bindings = [ | |
| '<img' => ['click: lightbox.show'] | |
| ]; | |
| foreach ($bindings as $tag => $directives) { | |
| $directive = sprintf('%s data-bind="%s" ', $tag, implode(', ', $directives)); | |
| $content = str_replace($tag, $directive, $content); | |
| // <img data-bind="click: lightbox.show" |
This file contains hidden or 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); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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: |