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> | |
<meta charset="utf-8"/> | |
<title>Buffer construction</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
#!/bin/bash | |
# Usage: HOST=public_gateway_ip_here ./internet.sh | |
CONNECTED=30 | |
DISCONNECTED=0 | |
INTERVAL=$DISCONNECTED | |
while sleep $INTERVAL | |
do | |
LOSS=$(ping -c 10 -s 14 $HOST|grep packet|awk '{print $7}'|cut -d'.' -f1) | |
echo "$LOSS packets lost" |
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
module Main exposing (..) | |
import Math.Vector3 exposing (..) | |
import WebGL exposing (Shader, Mesh) | |
import WebGL.Settings exposing (Setting) | |
import WebGL.Settings.StencilTest as StencilTest | |
import Html exposing (Html) | |
import Html.Attributes exposing (width, height) | |
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
(-1,1,1) +================+ (1,1,1) | |
/| /| | |
/ | | / | | |
(-1,1,-1)+================+ (1,1,-1) | |
| | | / | | | |
| | |/ | | | |
| | +-------|->| | |
(-1,-1,1|) +--(0,0,0)----|--+ (1,-1,1) | |
| / | / | |
|/ |/ |
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
/*! (c) 2016 Andrea Giammarchi - MIT Style License */ | |
// simple state-like objects handler | |
// based on prototypal inheritance | |
function State() {'use strict';} | |
// States are serializable dictionaries | |
// toJSON and toString are the only reserved keywords | |
// every other name can be used as name (included __proto__) |
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
<script> | |
var img = new Image(); | |
img.onerror = function () { | |
var script = document.createElement('script'); | |
script.src = 'elm.js'; | |
script.onload = function () { | |
Elm.fullscreen(Elm.Main, { | |
locationHash: window.location.hash, | |
windowDimensions: [window.innerWidth, window.innerHeight] | |
}) |
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 Stream = require('stream') | |
var gulp = require('gulp') | |
var postcss = require('gulp-postcss') | |
function errorStream () { | |
var stream = new Stream.Transform({ objectMode: true }) | |
stream._transform = function (file, encoding, cb) { | |
cb(new Error('unhandled exception!')) | |
} | |
return stream |
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
<html> | |
<body> | |
<!-- load combined svg file (with symbols) into body--> | |
<script> | |
(function (doc) { | |
var scripts = doc.getElementsByTagName('script') | |
var script = scripts[scripts.length - 1] | |
var xhr = new XMLHttpRequest() | |
xhr.onload = function () { |
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
// This mixin is used to ease workaround explained in this article | |
// http://n12v.com/css-retina-and-physical-pixels/ | |
// Creates linear gradient for specified border | |
@function border-gradient($side, $color: currentColor, $width: 0.5px) { | |
@if $side == top { | |
@return linear-gradient(180deg, $color, $color 50%, transparent 50%) top left / 100% #{$width * 2} no-repeat; | |
} @else if $side == bottom { | |
@return linear-gradient(0, $color, $color 50%, transparent 50%) bottom right / 100% #{$width * 2} no-repeat; |
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
define(function() { | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
window.ga('create', 'UA-XXXXXXXX-X') | |
return { |
NewerOlder