Skip to content

Instantly share code, notes, and snippets.

View toolness's full-sized avatar

Atul Varma toolness

View GitHub Profile
@toolness
toolness / Preferences.sublime-settings
Created July 19, 2015 18:42
My sublime 3 settings
{
"font_size": 12,
// The number of spaces a tab is considered equal to
"tab_size": 2,
// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": true,
// When enabled, pressing tab will insert the best matching completion.
// When disabled, tab will only trigger snippets or insert a tab.
// Shift+tab can be used to insert an explicit tab when tab_completion is
// enabled.
@toolness
toolness / mini-loader.js
Last active August 29, 2015 14:25
Miniature ES6 module loader for Babel in the browser
// This is a tiny loader for ES6 modules with Babel in the browser.
// It's only intended for quick prototypes and such, to avoid having to
// set up some sort of build system or muck around with RequireJS
// configuration.
//
// It requires using Babel in the browser, as documented in
// https://babeljs.io/docs/setup/#babel_in_browser.
//
// ## Example Usage
//
@toolness
toolness / webmaker-android-setup-notes.md
Last active August 29, 2015 14:23
Notes on Webmaker App development setup

Here are some notes and suggestions regarding the setup instructions for the webmaker-android project, which I followed on June 29, 2015.

I can either file these suggestions as issues, or issue PRs for them directly.

  • The "Android" section of README.md says:

    If you make a change regarding activities within this native Android wrapper, you will need to update the res/xml/app_tracker.xml file to create a display name for that new activity, in Google Analytics.

    I'm not sure what "activities" means in this context. Also, this seems to be something that belongs in the "Adding New Pages or Components" or the "Google Analytics Event Firing" section, or in some other section entirely, rather than at the beginning of the Android setup instructions.

@toolness
toolness / process-discourse-users.js
Last active August 29, 2015 14:22
Compare Webmaker Discourse users to Webmaker users
// This script generates a Markdown-formatted report to help with the
// following GitHub issue:
//
// https://github.com/mozilla/teach.webmaker.org/issues/930
//
// Before running it, install the dependencies:
//
// npm install underscore superagent event-stream progress
var fs = require('fs');
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<script>
@toolness
toolness / guess_the_number.rs
Created March 15, 2015 16:31
Guess The Number in Rust
#![feature(old_io)]
#![feature(rand)]
#![allow(deprecated)]
use std::cmp::Ordering;
use std::old_io;
use std::rand;
fn cmp(a: u8, b: u8) -> Ordering {
if a > b {
@toolness
toolness / jsbin-proxy.js
Created January 29, 2015 05:46
JS Bin Proxy
var http = require('http');
var urlParse = require('url').parse;
var PORT = process.env.PORT || 3000;
http.createServer(function(req, res) {
var info = urlParse(req.url);
if (req.method != 'GET') {
res.writeHead(405);
@toolness
toolness / feminism-faq.md
Last active August 29, 2015 14:07
Feminism FAQ

This page was a compilation of research answering questions on thewomansplainer.com, as well as some of my own.

Due to a number of tweets accusing me of stealing business from thewomansplainer.com, I've moved this document to a private gist.

@toolness
toolness / baconjs-infinite-scroll.html
Last active August 29, 2015 14:05
An attempt to implement infinite scrolling using Bacon.js, a Functional Reactive Programming (FRP) library.
<!DOCTYPE html>
<meta charset="utf-8">
<title>Bacon.js Infinite Scroll Attempt #2</title>
<p>Keep scrolling down to see more numbers.</p>
<div id="results"></div>
<img id="throbber" src="http://upload.wikimedia.org/wikipedia/commons/d/de/Ajax-loader.gif" style="position: fixed; bottom: 4px; right: 4px;">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bacon.js/0.7.22/Bacon.js"></script>
<script>
var pageChanged = new Bacon.Bus();
@toolness
toolness / hive-directory-listing.php
Created August 14, 2014 19:34
Wordpress plugin to list Hive member organizations from a Hive Directory server.
<?php
/**
* @package Hive_Directory_Listing
* @version 1.0
*/
/*
Plugin Name: Hive Directory Listing
Plugin URI: http://github.com/toolness/hive-django
Description: This is a plugin that integrates your WordPress site with the Hive\
directory.