Skip to content

Instantly share code, notes, and snippets.

@danalloway
danalloway / gist:75987741194344df03c3
Created June 7, 2014 02:57
FFMPEG - Convert / Copy MKV to MP4 container format
# straight copy mkv to mp4
# no conversion takes place
# 100% passthru for both audio and video
ffmpeg -i input.mkv -c:v copy -c:a copy output.mp4
@danalloway
danalloway / legacy.php
Created July 11, 2014 17:40
Drupal - Feeds Tamper - Legacy Import ID Swap
<?php
/**
* When migrating Drupal sites using Feeds sometimes you'll need to re-map entity relationships.
* When importing User Accounts, I always save the legacy UID from the old system.
* Then while importing data that needs to re-map to the UID, I load it the legacy UID from the CSV,
* then swap it out with the newley created ID using Feeds Tamper PHP.
*/
if (!empty($field)) {
Verifying myself: My Bitcoin username is +daniam. https://onename.io/daniam
@danalloway
danalloway / index.html
Last active October 27, 2015 19:56
HTML5 Boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
@danalloway
danalloway / 503.nginx
Created February 16, 2016 16:50
Custom NGINX 503 Page
server {
server_name _;
# override how 503's should be handled
error_page 503 @503;
location @503 {
# attempt to server our custom 503 first
# then fall back to the built-in one
try_files /503.html =503;
@danalloway
danalloway / ssl.nginxconf
Last active May 15, 2017 12:37
Force full, secure SSL configuration on an NGINX site.
# capture HTTP requests to example.com and www.example.com
# and permanently redirect them to the HTTPS version of the site
#
server {
listen 80; # IPv4
listen [::]:80; # IPv6
server_name example.com www.example.com;
@danalloway
danalloway / devcoin.sh
Last active May 15, 2017 12:38
compile devcoin on ubuntu 14.04
sudo aptitude update && sudo aptitude safe-upgrade
sudo aptitude install build-essential python-software-properties autoconf libtool libssl-dev libboost-all-dev libdb4.8-dev libdb4.8++-dev
sudo aptitude add-apt-repository ppa:bitcoin/bitcoin
sudo aptitude install bitcoin
sudo aptitude build-dep bitcoin
cd ~
git clone https://github.com/coinzen/devcoin.git

Keybase proof

I hereby claim:

  • I am danalloway on github.
  • I am danalloway (https://keybase.io/danalloway) on keybase.
  • I have a public key ASCwi8A8WbtHO1dOgZmOJo4jdOcqjrSK5yBOQ05-xrNyGQo

To claim this, I am signing this object:

@danalloway
danalloway / app.js
Last active November 7, 2017 08:07
preact, redux, react-router-redux SSR
import { h } from 'preact';
import Link from 'react-router-dom/Link';
import Route from 'react-router-dom/Route';
import Switch from 'react-router-dom/Switch';
import Home from '../routes/Home';
import About from '../routes/About';
const App = () => (
<div>
@danalloway
danalloway / bitcoin.conf
Last active February 10, 2018 22:05
My Bitcoin & P2Pool Configuration files.
server=1
daemon=1
rpcuser=
rpcpassword=
blockmaxsize=1000000
mintxfee=0.00001
minrelaytxfee=0.00001