Skip to content

Instantly share code, notes, and snippets.

Dennis Schneider dschneider

Block or report user

Report or block dschneider

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dschneider / debug.clj
Last active Aug 29, 2015 — forked from vsmart/gist:8deecda2be8fb3e6afa0
Debug clojure cool
View debug.clj
;; This is a useful macro for clojure debugging
(defmacro dbg[x] `(let [x# ~x] (println "dbg:" '~x "=" x#) x#))
;; Use it anywhere in your expression like so:
(defn factorial[n] (if (= n 0) 1 (* n (dbg (factorial (dec n))))))
;; Taken from [stackoverflow](
dschneider /
Last active May 29, 2018
Stream file over network with netcat and pigz
# pigz is "A parallel implementation of gzip for modern multi-processor, multi-core machines"
# See
# On the receiving machine run this:
nc -w 10 SENDING_MACHINE_IP 7878 | pigz -d | tar x
# On the sending machine run this:
tar c FILENAME_HERE | pigz | nc -l 7878
# You can compare the md5 checksum from both files after the transfer,

Keybase proof

I hereby claim:

  • I am dschneider on github.
  • I am dschneider ( on keybase.
  • I have a public key whose fingerprint is FED7 7C45 B87E 8ABA D362 F678 4AE9 9923 616C 4C6E

To claim this, I am signing this object:

dschneider /
Created May 16, 2014
Generate an SSL certificate locally
openssl req -x509 -newkey rsa:2048 -keyout key.pem -out cert.pem -days XXX
dschneider / convert_utf8_to_utf8mb4
Created May 7, 2014
How to easily convert utf8 tables to utf8mb4 in MySQL 5.5
View convert_utf8_to_utf8mb4
# For each database:
ALTER DATABASE database_name CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;
# For each table:
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
# For each column:
ALTER TABLE table_name CHANGE column_name column_name VARCHAR(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
# (Don’t blindly copy-paste this! The exact statement depends on the column type, maximum length, and other properties. The above line is just an example for a `VARCHAR` column.)
dschneider / CameraMovement.cs
Created Mar 14, 2014
Unity 2D Camera movement
View CameraMovement.cs
using UnityEngine;
using System.Collections;
public class CameraMovement : MonoBehaviour {
public float dampTime = 0.15f;
private Vector3 velocity =;
private Transform target;
// Use this for initialization
#!/usr/bin/env sh
# This is script with usefull tips taken from:
# install it:
# curl -sL | sh
dschneider /
Created Nov 5, 2013
GIT: Open modified files in VIM
gst | grep modified | awk '{print $3}' | xargs vim
View route53_change_cname.rb
credentials_hash = {
aws_secret_access_key: "KEY",
aws_access_key_id: "ID"
route53 =
resource_record_sets = route53.list_resource_record_sets("ZONE_ID")
data =[:body]["ResourceRecordSets"]
redis_resource_record = data.detect { |record_set| record_set["Name"] == "record_name_with_a_dot_at_the_end." }
former_cname_entry = redis_resource_record["ResourceRecords"].first
dschneider /
Created Oct 26, 2013
Kill process by name with shell
ps aux | grep PROCESS_NAME | grep -v grep | awk '{print $2}' | xargs kill -9
You can’t perform that action at this time.