Skip to content

Instantly share code, notes, and snippets.

View mrmartineau's full-sized avatar
👋
Aho Young Warrior

Zander Martineau mrmartineau

👋
Aho Young Warrior
View GitHub Profile
@hsribei
hsribei / putting-the-tor-back-in-torrent.md
Last active January 18, 2017 22:08
Putting the "Tor" back in Torrent

Putting the "Tor" back in Torrent

How a Popcorn Time fork patch could incentivize people to run thousands of new Tor relays

This is a follow-up to this discussion: Can NAT traversal be Tor's killer feature?

If torrents are P2P's killer application, and NAT traversal/"static IP" are Tor's (via hidden services), putting them together could prove to be the best incentivization scheme for growing the Tor network other than cold crypto cash.

You're stupid

Everybody knows you're not supposed to use torrents with tor, right?

@ykhs
ykhs / _linear-gradient.scss
Created September 10, 2012 11:55
linear-gradient Sass Mixin
@mixin linear-gradient($angle, $color-stops...) {
$_angle-with-vendor-prefix: "";
$_angle: "";
@if $angle == "to top" or $angle == "bottom" {
$_angle-with-vendor-prefix: bottom;
$_angle: to top;
} @else if $angle == "to right" or $angle == "left" {
$_angle-with-vendor-prefix: left;
$_angle: to right;
} @else if $angle == "to bottom" or $angle == "top" {
@mrinalwadhwa
mrinalwadhwa / clearfix.css
Created June 15, 2012 05:37
CSS clearfix
/* based on http://www.yuiblog.com/blog/2010/09/27/clearfix-reloaded-overflowhidden-demystified/ */
.cf:before,
.cf:after {
content: ".";
display: block;
height: 0;
overflow: hidden;
}
.cf:after {clear: both;}
@roboshoes
roboshoes / tween.js
Last active January 25, 2018 18:19
Small tweening function for the quick tween.
export function tween( time, update ) {
const start = Date.now();
var isCanceled = false;
var isComplete = false;
var chain = [];
function loop() {
if ( isCanceled ) return;
@jonathantneal
jonathantneal / mediaquery.js
Last active February 6, 2018 21:21
Media Queries for everybody
(function () {
var
documentElement = document.documentElement,
viewportFontSize, viewportHeight, viewportIsPortrait, viewportMax, viewportMin, viewportWidth;
function getViewportFontSize() {
var
body = documentElement.appendChild(document.createElement('body')),
iframe = document.createElement('iframe'),
iframeDocument;
#!/bin/bash
mkdir tmp.$$
for i in {0..9999}; do
echo ".x$i{color:green;}"
done > tmp.$$/main.scss
rm -rf .sass-cache
echo Sass:
@crh
crh / backbone-tutorial.md
Created October 8, 2012 12:16
Backbone & Yeoman

Backbone.js and yeoman

description

this is a list tutorials for building web application using backbone.js and yeoman. We are building a Photo Gallery JS App from Backbone Fundamentals

Requirements

@busches
busches / gulpfile.babel.js
Created July 26, 2015 23:56
Gulpfile with Babel and ES6
import gulp from 'gulp';
import { argv as args } from 'yargs';
import browserSync from 'browser-sync';
import del from 'del';
import path from 'path';
import assign from 'lodash.assign';
import configRaw from './gulp.config';
const config = configRaw();
import gulpPlugins from 'gulp-load-plugins';
const $ = gulpPlugins({lazy: true});
require 'json'
require 'net/http'
# JSON parser tag, creating map for use in jekyll markdown
# Alex.Heneveld @ Cloudsoft Corp (remove spaces and add the .com)
# Released under APL 2.0
# usage: {% jsonball varname from TYPE PARAM %}
#
# where TYPE is one of {data,var,file,page}, described below
@ellm
ellm / webpack-notes.md
Last active January 17, 2019 10:20
Webpack Notes and Snippets

Webpack 3.0

Code spliting in webpack to help decrease loaded dependencies on load.

  • UI that gets displayed as a callback from an event can benefit.
  • We can async. load a ES6 import() and code after it is returned using a promise.
// At top of file, assign an `import()` that is returned from a function.
const getBloodhound = () => import('bloodhound-js');

// Add an event that will trigger loading the module.