Skip to content

Instantly share code, notes, and snippets.

View jbfink's full-sized avatar
💭
we have statuses now? is this AOL?

John Fink jbfink

💭
we have statuses now? is this AOL?
View GitHub Profile
@djmaze
djmaze / Dockerfile
Last active December 27, 2015 05:18
Dockerfile for Ghost (production installation)
# Install Ghost blogging platform and run in production environment on port 2368.
#
# 1. Clone https://github.com/TryGhost/Ghost.git and put this file into the project root directory.
# 2. Replace www.example.com (down below) with the FQDN the blog is supposed to run on.
# 3. Build with:
# sudo docker build -t ghost .
# 4. Create local data directory:
# mkdir -p ~/.docker_volumes/ghost/data
#
# Run it with:
@atomotic
atomotic / gist:7069028
Created October 20, 2013 12:39
warcprox
~ virtualenv env
~ source env/bin/activate
~ pip install git+https://github.com/nlevitt/warctools@tweaks
~ pip install pyOpenSSL
~ git clone git clone https://github.com/nlevitt/warcprox
~ cd warcprox
~ python warcprox.py --rollover-idle-time=7200
2013-10-20 14:36:07,923 66818 MainThread INFO server_activate(warcprox.py:346) listening on 127.0.0.1:8080
2013-10-20 14:36:07,924 66818 MainThread INFO _read_ca(warcprox.py:75) read CA key+cert from ./warcprox-ca.pem
2013-10-20 14:36:07,928 66818 WarcWriterThread INFO run(warcprox.py:510) WarcWriterThread starting, directory=/private/tmp/warcprox/warcs gzip=False rollover_size=1000000000 rollover_idle_time=7200 prefix=WARCPROX port=8080
@mreidsma
mreidsma / libtechconf.markdown
Created October 10, 2013 18:43
My presentation proposal for Library Technology Conference 2014

Holistic Tech: Harness Your Library's Data Fetish to Solve the Right Problems

Session Abstract

Libraries have jumped on the User Experience bandwagon of late, rethinking our tools and services with a new focus on patron needs. But we still see things differently than our patrons. Where we see discrete services supporting our larger mission, patrons only see a confusing website. Without a holistic view, we spend our time solving the wrong problems.

Fortunately, we have everything we need locked up in data silos. In this presentation, I'll talk about how to get that data out of the dark and make it a powerful tool in reshaping your library's commitment to service.

Full Description

@Kimundi
Kimundi / dynamic_typing.rs
Last active January 6, 2023 18:56
Dynamic typing in Rust
use std::unstable::intrinsics::{TyDesc, get_tydesc, forget};
use std::util::Void;
use std::cast::transmute;
///////////////////////////////////////////////////////////////////////////////
// TypeId
///////////////////////////////////////////////////////////////////////////////
/// `TypeId` represents a globally unique identifier for a type
pub struct TypeId {
@djfiander
djfiander / sedscript.sh
Created August 2, 2013 16:11
The right way to do it
sed -e "s/database_name_here/$WORDPRESS_DB/
s/username_here/$WORDPRESS_DB/
s/password_here/$WORDPRESS_PASSWORD/
/'AUTH_KEY'/s/put your unique phrase here/`pwgen -c -n -1 65`/
/'SECURE_AUTH_KEY'/s/put your unique phrase here/`pwgen -c -n -1 65`/
/'LOGGED_IN_KEY'/s/put your unique phrase here/`pwgen -c -n -1 65`/
/'NONCE_KEY'/s/put your unique phrase here/`pwgen -c -n -1 65`/
/'AUTH_SALT'/s/put your unique phrase here/'`pwgen -c -n -1 65`/
/'SECURE_AUTH_SALT'/s/put your unique phrase here/`pwgen -c -n -1 65`/
/'LOGGED_IN_SALT'/s/put your unique phrase here/`pwgen -c -n -1 65`/
@jpetazzo
jpetazzo / README.md
Last active August 21, 2019 17:55
Give network superpowers to docker

Unionize: network superpowers for your docker containers

Unionize lets you connect together docker containers in arbitrarily complex scenarios.

Note: I recommend to use https://github.com/jpetazzo/pipework instead.

  • pipework is a better name than unionize
  • it's hosted on a "real" github repo instead of a small gist :-)

Now if you want Unionize, it's still here. Just check those examples.

@tobert
tobert / p2d.sh
Last active May 27, 2020 15:59
Physical-to-Docker conversion script ... as in, these are the steps I went through, but this script is not something you want to run on any machine you care about. I've removed employer-specific stuff from this copy.
#!/bin/bash
#
# This is really just notes, but I put them in a shell script so I get
# free highlighting and easy cut/paste (in and out).
#
echo "Don't run this script! It's meant to be read. It will destroy your system!"
exit 1
RAW="lucid-amd64-cdh3u4-raw"
@ruebot
ruebot / gist:5462998
Created April 25, 2013 20:43
drupal filter issues
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
ERROR 2013-04-25 16:15:25.992 [http-8080-1] (DrupalAuthModule) SQLState: 08S01
ERROR 2013-04-25 16:15:25.993 [http-8080-1] (DrupalAuthModule) VendorError: 0
ERROR 2013-04-25 16:15:25.993 [http-8080-1] (DrupalAuthModule) Error Connecting to Database server localhost port 3306 database digital_library_drupal
ERROR 2013-04-25 16:15:25.993 [http-8080-1] (AuthFilterJAAS) javax.security.auth.login.LoginException: Login Failure: all modules ignored
@bensie
bensie / base.rb
Created December 6, 2012 17:53
Sinatra API Helpers
require "sinatra/base"
require "sinatra/namespace"
require "multi_json"
require "api/authentication"
require "api/error_handling"
require "api/pagination"
module Api
class Base < ::Sinatra::Base