Skip to content

Instantly share code, notes, and snippets.

🍄
My responses are limited; you must ask the right questions.

NewAlexandria

🍄
My responses are limited; you must ask the right questions.
Block or report user

Report or block NewAlexandria

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@NewAlexandria
NewAlexandria / keybase.md
Created Jan 3, 2017
keybase prove github newalexandria
View keybase.md

Keybase proof

I hereby claim:

  • I am newalexandria on github.
  • I am newalexandria (https://keybase.io/newalexandria) on keybase.
  • I have a public key ASC1Scdtf-36b4jiLY8AvgvFFqjVow1-Cnbiw43f6vzmjgo

To claim this, I am signing this object:

View bad_bandwidth_tweeter.py
#!/usr/bin/python
# from https://www.reddit.com/r/technology/comments/43fi39/i_set_up_my_raspberry_pi_to_automatically_tweet/
import os
import sys
import csv
import datetime
import time
import twitter
@NewAlexandria
NewAlexandria / pr-template.md
Last active Jan 20, 2016
test dupe from sprintly's culture repo
View pr-template.md

z

What's this PR do?

Where should the reviewer start?

How should this be manually tested?

@NewAlexandria
NewAlexandria / chord.rb
Created Jan 1, 2016 — forked from Aearnus/chord.rb
circle modular multiplication chord renderer
View chord.rb
# with reference to rendered output but the OP
# https://www.reddit.com/r/mathpics/comments/3yzu77/heres_an_animated_version_of_that_circular/
# and a video guide
# https://www.youtube.com/watch?v=qhbuKbxJsk8
require "rmagick"
RESOLUTION = 800
def localToGlobalCoords(n)
@NewAlexandria
NewAlexandria / brew_inventory.rb
Created Oct 19, 2015
A quickie copypasta for getting your main brew packages
View brew_inventory.rb
#!/usr/bin/env ruby
bl = `brew list`.split ;1
bdl = bl.reduce({}) {|h, pkg| h.merge({pkg => `brew deps #{pkg}`.split }) } ;1
bi = bl - bdl.values.flatten.sort
File.open('apps_brew.txt', 'w') {|f| f.write bi.join("\n") }
View submodules_to_neobundle.rb
File.open(".vimrc","a") do |f|
f.write File.readlines('.gitmodules')
.map(&:strip)
# remove extras
.reject do |l|
l.scan('[').any? || # submodule defs
l.scan(/^path/).any? || # submodules paths
l.empty? # blank lines
end
# remap URLs to user/repo names
@NewAlexandria
NewAlexandria / recent_papers_we_love.js
Created Jun 8, 2015
A list of the 10 most-recent submissions to papers we love
View recent_papers_we_love.js
if (!window.jQuery) { document.write('<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"><\/script>') };
var recent_papers = [];
var commits = {};
var base_commit = '';
while (recent_papers.length < 10) {
commits_url = "https://api.github.com/repos/papers-we-love/papers-we-love/commits?sha="+base_commit;
$.ajax({
url: commits_url,
success: function(data) {
$(data).each( function(idx) {
@NewAlexandria
NewAlexandria / letter permutation
Created Apr 9, 2015
Outputs string combinatorics
View letter permutation
r = ('a'..'z')
r.map{|l| r.map{|w| r.map{|q| q+w+l} } }.flatten
r.map{|l| r.map{|w| r.map{|q| r.map{|t| q+w+l+t } }} }.flatten.size
# add exclusions
# add recursion
@NewAlexandria
NewAlexandria / lucidchart.js
Created Nov 26, 2014
The unminified source of Lucidcharts, as of 2014-11-26
View lucidchart.js
This file has been truncated, but you can view the full file.
(function() {
var h, ba = ba || {},
ca = this;
function da(a) {
return void 0 !== a
}
function ha(a) {
View gist:14e552964fc32b491326
// Processing motion blur
// 'time' runs from 0 to 1
// ignore everything above the /////////
// by Dave @ beesandbombs
int[][] result;
float time;
void setup() {
setup_();
You can’t perform that action at this time.