View this code at http://livecoding.io/5922395
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>title</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css"> | |
</head> | |
<body> | |
<h1>Hello, world</h1> | |
<script src="http://code.jquery.com/jquery.js"></script> |
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
#!/usr/bin/env perl | |
=head1 Examples | |
$ tail -f access_log | perl colorize.pl | |
$ plackup app.psgi 2>&1 | perl colorize.pl | |
=cut | |
use strict; |
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
find . -iname ".svn" -print0 | xargs -0 rm -r | |
svn export /path/to/old/working/copy /path/to/plain/code |
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
<style> | |
table{ | |
width:100%; | |
} | |
table tr {display:inline} | |
table tr:nth-child(1){ | |
position:relative; | |
} | |
table tr:nth-child(1) td{ | |
position:absolute; |
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
#!/usr/bin/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>D3 clock Example</title> | |
<style> | |
</style> | |
</head> | |
<body> | |
<div id="chart1"></div> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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
/*jshint esnext: true */ | |
/* | |
https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes | |
1. Create a list of consecutive integers from 2 through n: (2, 3, 4, ..., n). | |
2. Initially, let p equal 2, the smallest prime number. | |
3. Enumerate the multiples of p by counting to n from 2p in increments of p, and mark them in the list (these will be 2p, 3p, 4p, ...; the p itself should not be marked). |
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
/* | |
Execute this from the javascript console in the browser, after you log in pentaho. | |
Get the listing of children of :home | |
Go through the list and send a put to deletepermanent with the id of the node. | |
*/ | |
$.getJSON("http://<server_url>:8080/pentaho/api/repo/files/:home/children", function(data){ | |
$.each(data, function(i, nodes){ | |
nodes.forEach(function(node){ | |
console.log(node.path,node.id); |
OlderNewer