Skip to content

Instantly share code, notes, and snippets.

View afeld's full-sized avatar

Aidan Feldman afeld

View GitHub Profile
@afeld
afeld / README.md
Last active April 12, 2019 06:17
Twitter bio search

A friend is looking for a new tech job and asked if I knew anyone at a handful of companies. I'm (meaningfully) connected to more people who are relevant to this on Twitter than LinkedIn, so figured it would be easiest to scour people's bios. Naturally, I did this in the nerdiest way possible and automated it.

<3 @aidanfeldman

P.S. See also:

@afeld
afeld / gist:5588226
Created May 15, 2013 23:23
Node.js Code Review Panel projects
@afeld
afeld / gist:5544426
Created May 8, 2013 23:20
show status of a bunch of git directories
for D in `find . -type d -depth 1`
do
cd $D
echo $D
git status
cd - > /dev/null
done
@afeld
afeld / group_by_new.rb
Last active December 16, 2015 23:49
ActiveRecord group_by performance. All the "USING BLOCK" tests are directly or indirectly using `Enumerable#group_by`, whereas the "USING SYMBOL" tests are using the new `ActiveRecord::FinderMethods#group_by`.
require 'benchmark'
require File.expand_path('../../../load_paths', __FILE__)
require "active_record"
RECORDS = 20000
conn = { :adapter => 'sqlite3', :database => ':memory:' }
@afeld
afeld / gist:5285885
Created April 1, 2013 16:11
kittenbomb
$(function(){
var kittenize = function(){
$('.fillmoreInner:not(.kitten)').each(function(i, el){
var $el = $(el);
var url = 'url("http://placekitten.com/' + $el.width() + '/' + $el.height() + '")';
$el.css('background-image', url);
$el.addClass('kitten');
});
$('img:not(.kitten)').each(function(i, el){
@afeld
afeld / gist:5242219
Last active December 15, 2015 09:59
HTML markup string that fails to be parsed by jQuery 1.9.1. Removing the leading and trailing whitespace fixes the problem.
<div class="galleryRow rowOf2">
<div class="introPanel xsome rowOf2-0 groupOf0 galleryPreview medium" data-gallery-id="5112c78b932b6315e6000115" data-xsome-size="0"><div class="introPanel-inner"><a href="http://gimli.aidan.jux.nu:8080/"><div class="galleryInfo"><div class="cornerButton"></div><div class="galleryInfo-child descriptionLinksEmpty"><div class="galleryInfo-sub-child"><div class="gallery-title"><div class="titleWrapper"><div class="juxTitle">EVERYTHING</div></div><div class="juxByline">by <span class="authordisplayname" data-empty-value="gimli" spellcheck="false">gimli</span></div></div><div class="galleryInfo-descriptionAndLinks" data-elem="descriptionAndLinks"><div class="juxByline">by <span class="authordisplayname" data-empty-value="gimli" spellcheck="false">gimli</span></div></div></div></div></div></a><div class="clear"></div></div></div>
<div class="introPanel xsome rowOf2-1 groupOf0 galleryPreview large" data-gallery-id="5112c78a932b6315e60000ea" data-xsome-size="0"><div class=
@afeld
afeld / gist:5201086
Last active August 17, 2023 18:43
job boards
@afeld
afeld / gist:5114389
Created March 8, 2013 05:27
JSONP failed deploy, after switching to free open-source plan
{
"_id":"659f632137e5bf99fb7e49caed006459",
"_rev":"2-832c2ae4a7472636d852c9ad1517b9a2",
"status":"ok",
"payload":{
"id":5334632,
"repository":{
"id":63478,
"name":"jsonp",
"owner_name":"afeld",
@afeld
afeld / gist:5003570
Last active April 13, 2020 17:03
GoDadddy->local Wordpress development setup

I've seen waaaay too many people modifying their Wordpress sites live, which is fragile because when (not "if") you break something, your visitors will see it. Here are steps for setting up a copy of your site locally, so you can muck around without worry. These instructions are for Wordpress sites hosted on GoDaddy specifically, but they should be fairly easy to interpret for other providers.

To back up your database

  1. Log into GoDaddy, and go to "My Account".
  2. Under "Web Hosting", click Launch next to your site's name.
  3. Under "Databases", click "MySQL".
  4. Next to your database name, click "Actions"->"Back Up".
  5. Log into FTP, and under /_db_backups/ you'll see a new *.sql file.
  6. Rename this to be mydb-YYMMDD.sql format (e.g. superwordpress-130220.sql).
@afeld
afeld / gist:4952991
Last active February 8, 2022 03:13
good APIs for mashups

This list has been superseded by Public APIs. Check there for APIs with Auth: No, HTTPS and CORS Yes.


List of data APIs that require no server-side auth or private credentials, and are thus good for small browser-only JS projects.