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
| <html> | |
| <head> | |
| <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
| <style>*{margin:0;padding:0;}</style> | |
| </head> | |
| <body> | |
| <canvas id="screen" width=1920 height=1080></canvas> | |
| <script> | |
| var step = 0; | |
| var width=1920; |
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
| <html> | |
| <head> | |
| <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
| </head> | |
| <body> | |
| <canvas id="screen" width=640 height=640></canvas> | |
| <script> | |
| var step = 0; | |
| function render(x, y, t) { |
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
| <html> | |
| <head> | |
| <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> | |
| </head> | |
| <body> | |
| <canvas id="screen" width=640 height=640></canvas> | |
| <script> | |
| var step = 0; | |
| function render(x, y, t) { |
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
| package main | |
| // run with: $ go test --bench=. -test.benchmem . | |
| // @see https://twitter.com/karlseguin/status/524452778093977600 | |
| import ( | |
| "math/rand" | |
| "strconv" | |
| "testing" | |
| ) |
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> | |
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
| <style type="text/css"> | |
| html { | |
| height:100% | |
| } | |
| body { | |
| height:100%; |
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> | |
| <style> | |
| * { | |
| padding:0; | |
| margin:0; | |
| } | |
| #canvas { | |
| width:400px; |
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
| // Copyright 2004-present Facebook. All Rights Reserved. | |
| /** | |
| * Immutable data encourages pure functions (data-in, data-out) and lends itself | |
| * to much simpler application development and enabling techniques from | |
| * functional programming such as lazy evaluation. | |
| * | |
| * While designed to bring these powerful functional concepts to JavaScript, it | |
| * presents an Object-Oriented API familiar to JavaScript engineers and closely | |
| * mirroring that of Array, Map, and Set. It is easy and efficient to convert to |
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
| package main | |
| import ( | |
| "crypto/tls" | |
| "github.com/facebookgo/grace/gracehttp" | |
| "log" | |
| "net/http" | |
| "rsc.io/letsencrypt" | |
| ) |
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 'lmdb' | |
| require 'snappy' | |
| class LMDBCacheStore | |
| attr_reader :max_size, :env, :db, :lru | |
| delegate :size, to: :db | |
| # The LMDB Gem has a bug where the Environment garbage collection handler will crash sometimes | |
| # if the environment wasn't closed explicitely before the reference was lost. | |
| # As a shitty workaround, we can make sure that we never lose a reference to the Environment by |
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 ruby | |
| # Copyright Bouke van der Bijl | |
| require 'nokogiri' | |
| # This script interpretes the HTTPS everywhere rulesets and extracts a list of hosts which are eligible for a 'simple' redirect, | |
| # e.g. where http://example.com needs to be redirected to https://example.com | |
| def is_simple?(rule) | |
| rule.attributes['from'].value == "^http:" && rule.attributes['to'].value == "https:" | |
| end |