Skip to content

Instantly share code, notes, and snippets.

View CasperPas's full-sized avatar

Jeff Le CasperPas

  • Freelancer
  • Hanoi, Vietnam
View GitHub Profile
@quietcricket
quietcricket / Global keyboard hook for OSX
Created January 8, 2014 07:42
OSX global keyboard hook. Requires root privileges.
// alterkeys.c
// http://osxbook.com
//
// Complile using the following command line:
// gcc -Wall -o alterkeys alterkeys.c -framework ApplicationServices
//
// You need superuser privileges to create the event tap, unless accessibility
// is enabled. To do so, select the "Enable access for assistive devices"
// checkbox in the Universal Access system preference pane.
@cmwinters
cmwinters / gist:ecca9475b47d5937abd2
Created August 11, 2014 20:14
Evenly distribute space without flexbox

A lot of times I need to distribute nav-items or something in CSS, but the left and right items need to be flushed left and right and the space between all items needs to be evenly distributed.

Here are a few solutions I've come up with.

1. Use text-align: justify to evenly space items.
// JUSTIFIED LIST
.justified-list {
	margin:0;
@deliro
deliro / Dockerfile
Last active April 17, 2020 12:33
python alpine lxml image example
FROM python:3.7-alpine
EXPOSE 8000
WORKDIR /app
COPY . .
RUN apk add --update --no-cache --virtual .build-deps \
g++ \
python-dev \
libxml2 \
libxml2-dev && \