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 crypt(message, shiftText, isDecrypt) { | |
'use strict'; | |
return caesarShift(message.toUpperCase(), getShift(shiftText, isDecrypt)); | |
} | |
function getShift(shiftText, isDecrypt) { | |
var shift; | |
if (isNaN(shiftText) && !/^-?\d+$/.test(shift)) { | |
console.log("Shift is not an integer"); | |
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
/* | |
* Your Stylesheet | |
* | |
* This stylesheet is loaded when Atom starts up and is reloaded automatically | |
* when it is changed. | |
* | |
* If you are unfamiliar with LESS, you can read more about it here: | |
* http://www.lesscss.org | |
*/ |
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
# was writen and run on system with Ruby 1.8.7 | |
require 'find' | |
require 'fileutils' | |
src_dir = '/path/to/iPhoto Library/Masters' | |
out_dir = '/path/wher/you/want/to/save/you/ruby-copy/' | |
count = 0 | |
new_count = 0 | |
Find.find(src_dir) do |path| | |
if not FileTest.directory?(path) |
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
String.prototype.times = function( n ) { | |
return Array.prototype.join.call( { length : n + 1 }, this ); | |
}; |
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> | |
<head> | |
<title>Twitter feed consumption example</title> | |
<style> | |
.main { | |
margin: 0 auto; | |
position: relative; | |
width: 328px; | |
height: 302px; |
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
<?php echo(exec("whoami")); ?> |
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
/** | |
* toUnderscored: converts string to underscored | |
*/ | |
String.prototype.toUnderscored = function () { | |
return this.replace(/^\s+|\s+$/g, "") | |
.toLowerCase() | |
.replace(/_/g, '') | |
.replace(/(\s[a-z0-9])/g, function ($1) { | |
return $1.replace(/\s/, '_'); | |
}) |
NewerOlder