Skip to content

Instantly share code, notes, and snippets.

Working from home

Chris Fidao fideloper

Working from home
View GitHub Profile
fideloper / convert_attach_from_db_to_file.php
Last active Dec 7, 2016
Converting Database Stored Attachments to the File System
View convert_attach_from_db_to_file.php
* Notes:
* This script will convert attachments from being stored on the DB to the file system
* NOTE: This script removes the atachments from your database. Before running this script make a backup. For real.
//No time limit
fideloper / develop
Created Nov 24, 2016
Helper for Laravel + Docker dev workflow
View develop
#!/usr/bin/env bash
# Set environment variables for dev
export APP_ENV=local
export APP_PORT=80
export DB_PORT=3306
export DB_ROOT_PASS=secret
export DB_NAME=homestead
export DB_USER=homestead
export DB_PASS=secret
fideloper /
Created Nov 4, 2016
Change many aws instances tags (boto3)
import boto3
import sys
ec2 = boto3.client('ec2')
# Grab where backup retention is 14 days so we can reduce it to 7
instances = ec2.describe_instances(Filters=[{'Name': 'tag:Retention', 'Values': ['14']}])
ids = []
fideloper /
Created Jun 27, 2016
Provision ubuntu 16.04 vagrant machine
#!/usr/bin/env bash
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get -y upgrade
# Get "add-apt-repository" Command
sudo apt-get install -y software-properties-common
fideloper / 22-fluentd.conf
Last active Apr 8, 2016
Quick notes on using Fluentd
View 22-fluentd.conf
# rsyslog conf referenced in tasks.yml
*.* @
fideloper /
Last active Mar 31, 2016
MySQL 5.7, Ubuntu 14.04 mystery


I have mysql 5.7.11-log installed on Ubuntu 14.04, installed from MySQL official deb repository deb trusty mysql-5.7.


Basically everything is stock configuration.

  • Innodb buffer pool is set to only 250M to ensure MySQL doesn't allocate too much to the buffer pool. There's only one innodb pool.
fideloper / SlackOAuthController.php
Last active Feb 17, 2017
Slack oAuth2.0 Round Trip
View SlackOAuthController.php
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use GuzzleHttp\Client;
class SignedRequest:
def __init__(self, request, secret):
self.request = request
self.secret = secret
def expected_signature(self):
method = self.request.method
uri = self.request.path
extras = self._get_extra_parameters()
fideloper /
Last active Jun 26, 2020
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
tar -xvjf curl-7.50.2.tar.bz2
You can’t perform that action at this time.