Skip to content

Instantly share code, notes, and snippets.

View cml815's full-sized avatar
🚑
Available for freelance

Caroline Leopold cml815

🚑
Available for freelance
View GitHub Profile
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active September 20, 2024 22:19
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

scollins@Sean-Collins-MBPr15 ~/src/philly-bike-router ±master⚡ » python philly-bike-router/cli.py
11th & Pine, Kahn Park is nearly full - 2 spaces left
33rd & Market is nearly empty - 1 bike left
15th & Spruce is nearly empty - 2 bikes left
38th & Lancaster has no bikes
4th & Walnut, NPS is nearly empty - 2 bikes left
12th & Filbert has no bikes
6th & Race has no bikes
University City Station is nearly empty - 1 bike left
18th & JFK has no bikes

Want to team up?

We're gauging interest in forming some kind of an informal group of lone data journalists to help us better connect and collaborate. If you're interested, please fill out our form and we'll go from there. Thanks!


Solo data journalist tips and tools

Get to work

@vitobotta
vitobotta / Importing posts from Wordpress into Jekyll.rb
Created March 26, 2011 22:50
The script I used to import posts from my Wordpress blog into a new Jekyll one.
%w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g}
require File.join(File.dirname(__FILE__), "downmark_it")
module WordPress
def self.import(database, user, password, table_prefix = "wp", host = 'localhost')
db = Sequel.mysql(database, :user => user, :password => password, :host => host, :encoding => 'utf8')
%w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder}
@stammy
stammy / Rakefile
Created January 24, 2011 08:01
rake task for creating a new jekyll post.
# ignore the "bit" stuff.. only relevant to my custom jekyll fork
desc 'create new post or bit. args: type (post, bit), title, future (# of days)'
# rake new type=(bit|post) future=0 title="New post title goes here" slug="slug-override-title"
task :new do
require 'rubygems'
require 'chronic'
type = ENV["type"] || "bit"
title = ENV["title"] || "New Title"