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
#!/usr/bin/env bash | |
for i in {0..127}; do | |
for j in {0..127}; do | |
wget -q "https://tiles.guildwars2.com/1/1/7/$i/$j.jpg" -O "$i-$j.jpg" & | |
done | |
while [ `jobs | wc -l` -gt 10 ]; do | |
sleep 1 | |
done | |
echo "$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
fn tupleize(num: ~int) -> (~int,) { | |
(num,) | |
} | |
fn main() { | |
let mut num = ~1; | |
loop { | |
(num,) = tupleize(num); | |
} |
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
(function() { | |
var streams = {}; | |
function Stream() { | |
this.enabled = true; | |
}; | |
Stream.prototype.log = function() { | |
if (this.enabled) { | |
window.console.log.apply(window.console, Array.prototype.slice.call(arguments, 0)); |
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
/* | |
* Base elements | |
*/ | |
body { | |
background: #EEE; | |
color: #222; | |
font-family: "Courier", monospace; | |
font-size: 16px; | |
margin: 0px; | |
min-width: 600px; |
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
FROM ubuntu:14.04 | |
MAINTAINER xymostech <[email protected]> | |
RUN apt-get -qq update | |
RUN apt-get -qqy install nodejs default-jre firefox xvfb || true | |
RUN apt-get -qqy install wget | |
RUN wget http://selenium-release.storage.googleapis.com/2.42/selenium-server-standalone-2.42.2.jar | |
RUN ln -s /usr/bin/nodejs /usr/bin/node | |
ENV DISPLAY :1 | |
CMD /bin/bash ~/run.sh | |
RUN echo "java -jar /selenium-server-standalone-2.42.2.jar > /dev/null &" >> ~/run.sh |
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
#!/usr/bin/env bash | |
echo "Syncing KaTeX directory there" | |
rsync --recursive --delete --links ./* KADev:docker-huxley/KaTeX/ | |
echo "Running docker-huxley" | |
ssh -t KADev sudo docker run -v /home/xymostech/docker-huxley/KaTeX:/KaTeX -i -t xymostech/huxley | |
echo "Syncing KaTeX directory back again" | |
rsync --recursive KADev:docker-huxley/KaTeX/test/huxley/* ./test/huxley/ |
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
require 'json' | |
require 'rubygems' | |
require 'ttfunk' | |
def metrics_for_file(filename) | |
file = TTFunk::File.open(filename) | |
max_height = 0 |
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
<style type="text/css"> | |
.katex-display { | |
margin: 1em 0; | |
text-align: center; | |
} | |
.katex-display > span { | |
display: inline-block; | |
overflow: hidden; | |
margin: 0 auto; |
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
javascript: $.ajax({ | |
/* Removes all the assessment items in an exercise. Set `window.exercise` to the name of | |
* the exercise (like `"addition_1"`). */ | |
type: "GET", | |
url: "/api/v1/exercises/" + window.exercise, | |
success: function(data) { | |
var id = data.id; | |
var sha = data.sha; | |
console.log("Got id", id, "and sha", sha); | |
$.ajax({ |
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
// almost 100% stolen from https://github.com/reactjs/react-router/blob/master/modules/Link.js | |
import React from 'react' | |
import { css } from 'aphrodite'; | |
import warning from './routerWarning' | |
const { bool, object, string, func, oneOfType } = React.PropTypes | |
function isLeftClickEvent(event) { | |
return event.button === 0 |