Skip to content

Instantly share code, notes, and snippets.

@dmjio
dmjio / Xorg.0.log
Created January 10, 2016 13:24 — forked from gilligan/Xorg.0.log
xorg and nixos configuration files
[ 165.023]
X.Org X Server 1.16.4
Release Date: 2014-12-20
[ 165.023] X Protocol Version 11, Revision 0
[ 165.023] Build Operating System: Linux 3.12.27 x86_64
[ 165.023] Current Operating System: Linux nixoslappy 3.14.34 #1-NixOS SMP Thu Jan 1 00:00:01 UTC 1970 x86_64
[ 165.023] Kernel command line: initrd=\efi\nixos\pnhjgx3v9pkxyhqhjcxh62l2axwnwd3g-initrd-initrd.efi systemConfig=/nix/store/siybfc2y9prrwk6bab8bz8yh0460axwb-nixos-14.12.496.5f7d374 init=/nix/store/siybfc2y9prrwk6bab8bz8yh0460axwb-nixos-14.12.496.5f7d374/init loglevel=4
[ 165.023] Build Date: 01 March 2015 04:27:12AM
[ 165.023]
[ 165.023] Current version of pixman: 0.32.6
@dmjio
dmjio / nixos-mac
Created January 10, 2016 02:44
Install NixOS on an iMac / Macbook
# NixOS manual
nixos.org/nixos/manual/
# GET ETHERNET / WIRED INTERNET FIRST
# Prepare USB stick - dependent on machines - this worked for an iMac
http://superuser.com/questions/795879/how-to-configure-dual-boot-nixos-with-mac-os-x-on-an-uefi-macbook
# Prepare hard disk via Disk Utility on OSX beforehand (for multiple oses)
@dmjio
dmjio / docker-push.sh
Created November 10, 2015 17:22 — forked from fizruk/docker-push.sh
Push to Docker from Circle CI
#!/bin/sh
set -x
CIRCLE_TAG=`git name-rev --tags --name-only $(git rev-parse HEAD)`
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
if [ "$CIRCLE_TAG" -ne "undefined" ]; then
docker tag user/repo user/repo:$CIRCLE_TAG
{-# LANGUAGE DeriveGeneric, FlexibleInstances, ScopedTypeVariables, FlexibleContexts, DataKinds, TypeFamilies #-}
module SwaggerExample where
import Data.Proxy
import qualified GHC.Generics as G
import Generics.SOP
data Todo = Todo {
created :: Int
, description :: String
@dmjio
dmjio / gist:330f02e2279446f4b4bf
Last active August 28, 2015 00:48 — forked from mikeyk/gist:1329319
Testing storage of millions of keys in Redis
#! /usr/bin/env python
import redis
import random
import pylibmc
import sys
r = redis.Redis(host = 'localhost', port = 6389)
mc = pylibmc.Client(['localhost:11222'])
#!/bin/bash
#
# Shell script to automatically configure a new Flask, nginx and uWSGI based blog
# on an Amazon EC2 instance.
#
# See http://bit.ly/MeGwjD for more information!
#
# If you are forking this for your own custom configuration script, see the following other gists:
# https://gist.github.com/3071737
# https://gist.github.com/3071739
@dmjio
dmjio / gist:4050405
Created November 10, 2012 08:17
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt