Skip to content

Instantly share code, notes, and snippets.

Avatar
🖤

James Wallen-Jones jamosaur

🖤
View GitHub Profile
@jamosaur
jamosaur / 70-u2f.rules
Last active Mar 25, 2017
Use yubikey on arch-linux
View 70-u2f.rules
# Copyright (C) 2013-2015 Yubico AB
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
View settings.md

Edit Variables

CAPGET: capitalize(GET)

View example
server {
listen 80;
server_name site-url.dev;
root /var/www/site-folder/public;
access_log /usr/local/etc/nginx/logs/default.access.log main;
location / {
try_files $uri $uri/ /index.php$is_args$args;
include /usr/local/etc/nginx/conf.d/php-fpm;
View php-fpm
location ~ \.php$ {
try_files $uri = 404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
View nginx.conf
worker_processes 1;
error_log /usr/local/etc/nginx/logs/error.log debug;
events {
worker_connections 1024;
}
http {
include mime.types;
View ImagesToLinks.user.js
View keybase.md

Keybase proof

I hereby claim:

  • I am jamosaur on github.
  • I am jamosaur (https://keybase.io/jamosaur) on keybase.
  • I have a public key whose fingerprint is C9B8 428B 2A40 BCDD 6DAE 1545 0B8D DFB7 2FD5 E6BF

To claim this, I am signing this object:

View day3.php
<?php
$i = file_get_contents('i');
//$i = '^>v<';
$x = $rx = 0;
$y = $ry = 0;
foreach (str_split($i) as $n => $dir) {
switch ($dir) {
case '^':
($n % 2 == 0) ? $x++ : $rx++;
View AOC-day 1 golf.php
<?php $e=str_split(file_get_contents('i'));$f=0;$h=0;foreach($e as$i=>$d){$d=='('?$f++:$f--;$f==-1&&$h==0?$h=$i+1:null;}echo $f.' '.$h;
View OS-X.md

Things to install

General

  • 1Password
  • Airmail
  • Firefox
  • iTerm2
  • Little Snitch
  • mac2imgur