Skip to content

Instantly share code, notes, and snippets.

@nbashaw
nbashaw / how_to_analyze_hnh_data.md
Created September 26, 2012 23:41
Here's a quick tutorial that will help you hack on H&H data

Hacking H&H with Ruby

Thanks to Kyle Mulka for scraping the data and putting it in a nice .json format!

Want to use Ruby to hack on H&H data? Good. I will teach you. Some assumptions I'm making about your computer:

  1. You have ruby
  2. You have rubygems
  3. You're on OS X or Linux.

If you don't have either of those things, google around. Now let's get going!

@nbashaw
nbashaw / gist:861e7f7a286211d9276c7feb274e7745
Created November 22, 2019 20:21 — forked from HarryGoodwin/gist:4528d6419915258e54b2f8c804687808
Attributed string bullet points - Swift
import UIKit
import PlaygroundSupport
struct StringConstants {
static let bullet1 = "This is a small string."
static let bullet2 = "This is more of medium string with a few more words etc."
static let bullet3 = "Well this is certainly a longer string, with many more words than either of the previuos two strings."
}
typealias ParagraphData = (bullet: String, paragraph: String)

Whiteboard

Whiteboard lets you create new rails apps insanely fast. Instead of going through all your configuration one step at a time in your terminal, with Whiteboard you just write everything once, then run it.

setup do
  rails_version '4.0.0'
  app_name 'dash'
  db 'postgres'
end
alert('what');

Chrome Actions

1. Utilities for URLs

It would be cool if I could explicitly define certain URLs as keywords, so I could just type fb and it would go to facebook.com. Right now typing f autocompletes to facebook, but that's not a behavior I explicitly control. You have to wait till chrome realizes you go to that site a lot for it to show up.

2. Actions based on site utilities

Since each site has a command line interface defined by it's URL, it would be cool if you could have utilities like "search" that could combine with site keywords to produce smart behavior, like fb search dan poggi or tw tweet just setting up my twttr.

3. Application launcher

Kind of an oddball one, but I think it would even be cool to launch native apps from the chrome urlbar. I'm in chrome almost all the time, and if I want to open or switch apps it would be sweet to open a new tab and type that application's keyword.

<!DOCTYPE html>
<html>
<head>
<style>
body {
font-family: sans-serif;
background: #ddd;
padding: 50px;
}
@andrewchen
Subscribe · Featured · Recent essays
Why developers are leaving the Facebook platform
Attitudes towards the Facebook platform have changed
Recently, Bill Gurley of Benchmark wrote a great piece on how platform companies like Facebook, iOS, Android, eBay, and others manage the ecosystem around them. It’s an important essay and I’d recommend you all read it. I found myself nodding my head as Facebook was discussed. In recent conversations with fellow entrepreneurs in Silicon Valley, it’s become a common belief that Facebook has become an undesirable platform for a startup to build their company.
require 'json'
require 'csv'
hnh = JSON.parse(File.read('hackersandhustlers2.json'))
names = []
# Make a list of all the unique names in hnh
hnh.each { |post| names << post['from']['name'] }
ppl = []
names = names.uniq!
TOP HACKERS AND HUSTLERS CONTRIBUTORS (2/15/13)
-----------------------------------------------
1 Nathan Bashaw 820
2 Alex Southern 313
3 Alex Schiff 307
4 Eric Jorgenson 250
5 Joe Minock 217
6 Jeff Epstein 212
7 Ajay Kapoor 188
$(function(){
// Scratchpad Intro
//--------------------------------------------------------------------------------
var intro =
['<style>',
' body {background: #DDD6B2;}',
' .container {',
' background: #fff;',