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
# Provides a category link with a count of the number of posts in | |
<ul> | |
{% for category in site.categories %} | |
<li id="{{ category[0] | downcase | replace:' ', '-' }}"><a href="/{{ category[0] }}/">{{category[0] | capitalize }}</a> <span>{{ category[1] | size }}</span></li> | |
{% endfor %} | |
</ul> | |
# .. and the same for tags | |
<dl> | |
{% for tag in site.tags %} |
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
/** | |
* Render templates. | |
* | |
* @param {String} The template to use `<p>Hello {{name}}</p>` | |
* @param {String} The data `{ name: 'Alex' }` | |
* @return {String} The rendered template | |
**/ | |
function template(t, d) { | |
return t.replace(/{{([^}]*)}}/g, function(m, f, p, a) { | |
return d[f] || ''; |
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> | |
<head> | |
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js'></script> | |
<script> | |
$(document).ready(function(){ | |
function debug(str){ $("#debug").append("<p>"+str+"</p>"); }; | |
if(typeof WebSocket === 'undefined') { | |
alert("Your browser does not support websockets.") | |
} |
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
#first we create a subclass of class string | |
class MyString < String | |
end | |
MyString.new | |
# => "" | |
#now we are going to override this method by some Ruby magic | |
MyString.class_eval do | |
def empty? |
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>Console Reporter Spec</title> | |
<link rel="stylesheet" href="../ext/jasmine.css" type="text/css" /> | |
<script type="text/javascript" src="../ext/jasmine.js"></script> | |
<script type="text/javascript" src="../ext/jasmine-html.js"></script> |
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
- (#baby-girl || #👶-👧) -> http://daniel.team/life | |
-OR- http://babybrooke.net | |
- (#baby-bear || #👶-🐻) -> http://daniel.team/life | |
-OR- http://sawyerrae.com | |
- (#funny || #😅) -> http://daniel.team/life | |
-OR- http://easierbycode.com | |
- #easierbycode -> http://daniel.team/code | |
-OR- http://followdaniel.com | |
- #teach-dc-code -> http://daniel.team/hacks | |
-OR- http://deftonescodemonkey.com |
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
#include <switch.h> | |
#include <stdio.h> | |
int main(int argc, char** argv) { | |
u32 kdown = 0x00000000; | |
u32 kdownOld = 0x00000000; | |
gfxInitDefault(); | |
consoleInit(nullptr); //Init the console |