Skip to content

Instantly share code, notes, and snippets.

View llbbl's full-sized avatar

Logan Lindquist llbbl

View GitHub Profile
#!/usr/bin/env python3
import collections
import datetime
import pprint
import click
import jinja2
import requests
@llbbl
llbbl / deploy.rb
Last active April 21, 2018 20:37
Capistrano deploy file for Laravel 5.x
# config valid only for current version of Capistrano
lock '3.4.0'
set :application, "Your app name" # EDIT your app name
set :repo_url, "https://github.com/laravel/laravel.git" # EDIT your git repository
set :deploy_to, "/var/www/my-app" # EDIT folder where files should be deployed to
set :keep_releases, 5
# set :linked_files, %w{.env} #EDIT uncomment this line once you have a .env file in :deploy_to/shared
@llbbl
llbbl / .screenrc
Last active February 24, 2018 19:39 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
startup_message off
function ec2-ssh () {
ssh -i ~/.ssh/$2 -l ubuntu $(aws ec2 describe-instances --filter Name=instance-id,Values=$1 | jq '.Reservations[0].Instances[0].PublicIpAddress' | tr -d '"')
}
@llbbl
llbbl / opencfp-simple.com
Last active April 17, 2016 20:24
nginx opencfp simple example
server{
server_name cfp.sitename.com;
root /var/www/opencfp/web;
listen 80;
index index.php index.html index.htm;
access_log /var/log/nginx/access.cfp.log;
error_log /var/log/nginx/error.cfp.log;
location / {
@llbbl
llbbl / opencfp.com
Last active April 17, 2016 20:17
nginx opencfp conf example
server{
server_name cfp.sitename.com;
root /var/www/opencfp/web;
access_log /var/log/nginx/access.cfp.log;
error_log /var/log/nginx/error.cfp.log;
listen 80;
index index.php index.html index.htm;
# Before Script
before_script:
- composer self-update
- composer install --prefer-dist > /dev/null
- cp .env.example .env
- php artisan key:generate
- php artisan migrate:refresh
# Services
services:

See a list of composer configuration settings.

composer config --list -g

Check to see if you already set a github personal access token

<?php
function array_splice_preserve ($input, $offset, $length, $replacement) {
$keys = array_keys($input);
$values = array_values($input);
array_splice($keys, $offset, $length, array_keys($replacement));
array_splice($values, $offset, $length, array_values($replacement));
return array_combine($keys, $values);
};
@llbbl
llbbl / .screenrc
Created August 15, 2013 06:43
.screenrc
caption always '%{= kG}[ %{G}%H::%t %{g}][%= %{= kw}%?%-Lw%?%{r} (%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m %{W}%c %{g}]'
autodetach on # Autodetach session on hangup instead of terminating screen completely
vbell off
term xterm-color
bind = resize =
bind + resize +1
bind - resize -5