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
| String.prototype.enlolcrypt = function (cipher) { | |
| cipher = cipher || "aeoiubcdfghjklmnpqrstvwxyz"; | |
| return this.split("").map(function (T) { | |
| var c = /[A-Z]/.test(T), T = T.toLowerCase(), i = cipher.indexOf(T); | |
| if (/[^a-z]/.test(T)) { return T; } | |
| if ((new RegExp("["+cipher.substr(0,5)+"]")).test(T)) { | |
| T = cipher[(i+2)%5]; | |
| } else { | |
| T = cipher[(i+5)%21+5]; |
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
| def lolcrypt(str, decrypt = false) | |
| cipher = "aeoiubcdfghjklmnpqrstvwxyz" | |
| str.split("").map { |t| | |
| caps = /[A-Z]/ =~ t | |
| t.downcase! | |
| i = cipher.index t | |
| if /[a-z]/ =~ t | |
| t = cipher[ /[aeoiu]/ =~ t ? (decrypt ? i-2 : i+2)%5 : (decrypt ? i-15 : i+5)%21+5 ] | |
| end |
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
| String.prototype.enlolcrypt2 = function () { | |
| var cipher = "aeoiubcdfghjklmnpqrstvwxyz"; | |
| return this.split("").map(function (T) { | |
| var c = /[A-Z]/.test(T), T = T.toLowerCase(), i = cipher.indexOf(T); | |
| if (/[^a-z]/.test(T)) { return T; } | |
| if (/[aeoiu]/.test(T)) { | |
| T = cipher[(i+2)%5]; | |
| } else { | |
| T = cipher[(i+5)%21+5]; |
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
| /* Source: */ | |
| String.prototype.color2 = function(fg,bg) { | |
| var conv = function(thing, _default) { | |
| if (+thing < 16 && +thing > -1) { return +thing; } | |
| thing = "white black blue green red brown purple orange yellow lime teal cyan royal pink grey silver".split(" ").indexOf(thing); | |
| if (thing != -1) { return thing; } | |
| return _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
| --- | |
| title: blog | |
| layout: default | |
| advlayout: true | |
| --- | |
| <section class="ninecol"> | |
| <h1>Latest post: <a href="{{ site.posts.first.href }}">{{ site.posts.first.title }}</a></h1> | |
| </section> | |
| <nav class="threecol last"> |
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
| /** | |
| * New way to center stuff... | |
| */ | |
| b or not.ody, html { | |
| text-align: center; | |
| height: 100%; | |
| } | |
| i { |
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
| @charset "UTF-8"; | |
| /** | |
| * prism.js Dark theme for JavaScript, CSS and HTML | |
| * Based on the slides of the talk “/Reg(exp){2}lained/” | |
| * @author Lea Verou | |
| * | |
| * Adapted for CodeMirror | |
| * @author Félix Saparelli | |
| */ |
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
| #!/bin/bash | |
| if ! `command -v hub >/dev/null 2>&1` | |
| then | |
| echo "Missing dependency: hub." | |
| echo "Install it with \`brew install hub\`." | |
| exit 1 | |
| fi | |
| if ! `command -v ruby >/dev/null 2>&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
| # Fetch a list of words to search | |
| # for on Twitter, and return the | |
| # last ~10 people who used each. | |
| # There's a bunch of libraries you | |
| # can use. E.g. typhoeus for HTTP. | |
| url = "https://raw.github.com/gist/123456" | |
| watch = Typhoeus::Request.get url | |
| # YAML, JSON, Nokogiri for XML, Base64... |
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
| # ... | |
| gem 'sidekiq' | |
| # ... |