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> | |
<style type="text/css" media="screen"> | |
.row { | |
display: flex; | |
border: 1px solid green; | |
} | |
.column { | |
border: 1px solid black; |
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
var firstVar = 1; | |
var secondVar = "second"; | |
var identityFunc = firstArg => firstArg; |
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
//As with all inheritance patterns, this isn't encouraged. While worth knowing and understanding, | |
//delegation is preferred in nearly all cases. | |
function Person(name) { | |
this.name = name; | |
} | |
Person.prototype.sayName = function(){ | |
console.log(this.name); | |
} | |
function Ninja(name) { |
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
/** | |
* Add jQuery event system to `customNamespace` namespace. | |
*/ | |
(function(){ | |
var eventBus = $({}); | |
$.each(['bind', 'unbind', 'trigger'], function(i, current){ | |
customNamespace[current] = function(){ | |
return eventBus[current].apply(eventBus, arguments); | |
} | |
}); |
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
//I wrote this on a plane from LA to NC because I had no internet connection and was bored | |
//It's not useful | |
if (typeof window === 'undefined') { | |
var window = global; | |
} | |
function each(array, fun){ | |
var length = array.length, | |
i = 0; | |
for (; i < length; i++){ |
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
/** | |
* Hard coded! Nah, we put our smart pants on the day we wrote page layouts. We even gave | |
* external developers a way to create new layouts. | |
* | |
* Layouts are algorithmically generated based on a JSON string in the layout toolbar. | |
* On an edit page, use your Javascript foo to find #rte-button-pagelayout in the DOM | |
* then check out the hidden toolbar just below it and you'll find the JSON I'm | |
* talking about. | |
* | |
* We expose an editor command though which you can add new layouts and provide |
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
/** | |
* Minified https://github.com/NobleJS/setImmediate | |
*/ | |
(function(a,h){function i(){if(!a.postMessage||a.importScripts)return!1;var b=!0,f=a.onmessage;a.onmessage=function(){b=!1};a.postMessage("","*");a.onmessage=f;return b}function j(b){b.setImmediate=a.msSetImmediate;b.clearImmediate=a.msClearImmediate}function k(b){b.setImmediate=function(){var b=c.addFromSetImmediateArguments(arguments),d=new a.MessageChannel;d.port1.onmessage=function(){c.runIfPresent(b)};d.port2.postMessage(null);return b}}function l(b){function f(b){b.source===a&&("string"===typeof b.data&& b.data.substring(0,d.length)===d)&&(b=b.data.substring(d.length),c.runIfPresent(b))}var d="com.bn.NobleJS.setImmediate"+Math.random();a.addEventListener?a.addEventListener("message",f,!1):a.attachEvent("onmessage",f);b.setImmediate=function(){var b=c.addFromSetImmediateArguments(arguments);a.postMessage(d+b,"*");return b}}function m(b){b.setImmediate=function(){var b=c.addFromSetImmediateArguments(arguments),a=document.createElement("script");a |
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
console = {} | |
console.log = (what) -> | |
alert what | |
class Person | |
constructor : (@name) -> | |
sayName : -> | |
console.log this.name | |
getName: -> | |
this.name |
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
//these three are the same | |
function foo() { | |
var wes = 'wes'; | |
var peter = 'peter'; | |
} | |
function foo() { | |
var wes, peter; | |
wes = 'wes'; | |
peter = 'peter'; |
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
diff --git a/themes/modern/modern.theme.bash b/themes/modern/modern.theme.bash | |
index 3efe9ff..a2e3577 100644 | |
--- a/themes/modern/modern.theme.bash | |
+++ b/themes/modern/modern.theme.bash | |
@@ -41,10 +41,10 @@ prompt() { | |
# Yes, the indenting on these is weird, but it has to be like | |
# this otherwise it won't display properly. | |
- PS1="${TITLEBAR}${bold_red}┌─${reset_color}$(modern_scm_prompt)[${cyan}\W${normal}][$(battery_charge)]$(is_vim_shell) | |
+ PS1="${TITLEBAR}${bold_red}┌─${reset_color}$(modern_scm_prompt)[${cyan}\w${normal}][$(battery_charge)]$(is_vim_shell) |
NewerOlder