Skip to content

Instantly share code, notes, and snippets.

View ctrlaltdylan's full-sized avatar

Dylan Pierce ctrlaltdylan

View GitHub Profile
@ctrlaltdylan
ctrlaltdylan / 01_sidekiq_upstart.config
Created December 13, 2019 16:14
EBextension for starting Sidekiq Process on Elasticbeanstalk
files:
"/opt/elasticbeanstalk/support/conf/sidekiq.conf":
mode: "000755"
content: |
description "Elastic Beanstalk Sidekiq Upstart Manager"
start on runlevel [2345]
stop on runlevel [06]
# explained above
respawn
@ctrlaltdylan
ctrlaltdylan / area_code_states.json
Created December 6, 2018 16:24
Each U.S. state area code and their corresponding state
{
"512": "TX",
"513": "OH",
"515": "IA",
"516": "NY",
"517": "MI",
"518": "NY",
"520": "AZ",
"530": "CA",
"531": "NE",
@ctrlaltdylan
ctrlaltdylan / state_area_codes.json
Created December 6, 2018 16:04
Phone area codes belonging to each US State
{
"AL": [205, 251, 256, 334, 938],
"AK": 907,
"AZ": [480, 520, 602, 623, 928],
"AR": [479, 501, 870],
"CA": [209, 213, 310, 323, 408, 415, 424, 442, 510, 530, 559, 562, 619, 626, 628, 650, 657, 661, 669, 707, 714, 747, 760, 805, 818, 831, 858, 909, 916, 925, 949, 951],
"CO": [303, 719, 720, 970],
"CT": [203, 475, 860, 959],
"DE": 302,
"FL": [239, 305, 321, 352, 386, 407, 561, 727, 754, 772, 786, 813, 850, 863, 904, 941, 954],
@ctrlaltdylan
ctrlaltdylan / dockerfile.yml
Last active November 13, 2018 05:23
Simple Laravel Container
version: '2'
services:
laravel:
image: php:latest
expose:
- '80'
- '443'
volumes:
- .:/home
@ctrlaltdylan
ctrlaltdylan / deploy.sh
Created September 19, 2018 03:50
Deploying Wordpress with Ansible
ansible-playbook playbook.yml -i hosts.yml -u ubuntu
@ctrlaltdylan
ctrlaltdylan / sendgrid_inbound_parse_webhook_example.json
Created July 6, 2018 20:31
SendGrid Inbound Parse Webhook Example
{
"headers": "Received: by mx0047p1mdw1.sendgrid.net with SMTP id 6WCVv7KAWn Wed, 27 Jul 2016 20:53:06 +0000 (UTC)
Received: from mail-io0-f169.google.com (mail-io0-f169.google.com [209.85.223.169]) by mx0047p1mdw1.sendgrid.net (Postfix) with ESMTPS id AA9FFA817F2 for <example@example.comom>; Wed, 27 Jul 2016 20:53:06 +0000 (UTC)
Received: by mail-io0-f169.google.com with SMTP id b62so81593819iod.3 for <example@example.comom>; Wed, 27 Jul 2016 13:53:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sendgrid.com; s=ga1; h=mime-version:from:date:message-id:subject:to; bh=DpB1CYYeumytcPF3q0Upvx3Sq/oF4ZblEwnuVzFwqGI=; b=GH5YTxjt6r4HoTa+94w6ZGQszFQSgegF+Jlv69YV76OLycJI4Gxdwfh6Wlqfez5yID 5dsWuqaVJZQyMq/Dy/c2gHSqVo60BKG56YrynYeSrMPy8abE/6/muPilYxDoPoEyIr/c UXH5rhOKjmJ7nICKu1o99Tfl0cXyCskE7ERW0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:sub
var private_key = postman.getEnvironmentVariable('private_key');
var public_key = postman.getEnvironmentVariable('public_key');
var method = request.method;
var content_type = 'application/json';
var content_md5 = '';
var request_url = request.url;
var request_uri = request_url.replace(/^.*\/\/[^\/]+/, '')
var timestamp = (new Date()).toGMTString();
@ctrlaltdylan
ctrlaltdylan / application.scss
Created March 16, 2017 14:20
Rails asset pipeline bootstrap-scss only import glyphicons
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
* files in this directory. Styles in this file should be added after the last require_* statement.
@ctrlaltdylan
ctrlaltdylan / ExampleControllerTestCase.php
Created May 26, 2016 17:21
This is an example of integrating MuffinFactory 3.0 into a Symfony 2 functional test
<?php
namespace Acme\DemoBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use League\FactoryMuffin\FactoryMuffin;
use League\FactoryMuffin\Stores\RepositoryStore;
class ExampleControllerTest extends WebTestCase
{
/**
@ctrlaltdylan
ctrlaltdylan / raspi2-kiosk.md
Created April 13, 2016 00:06
Tutorial for setting up a RasPi 2 to work as a lightweight kiosk.

Installing a minimal Arch Linux kiosk on a RasPi 2

Arch Linux is both lightweight and highly customizable, and is the perfect distro for creating a kiosk using the low-powered RasPi 2. Full details about Arch Linux on the RasPi 2 can be found on the [Official Arch Linux ARM wiki] (https://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2).

Getting started