Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -
export AWS_ACCESS_KEY=<your aws access key>
export AWS_SECRET_KEY=<your aws secret>
date_current=`date -u +%Y-%m-%d`
aws rds describe-db-snapshots --snapshot-type "automated" --db-instance-identifier <db_instance_name> | grep `date +%Y-%m-%d` | grep rds | tr -d '",' | awk '{ print $2 }' > /tmp/sandbox-snapshot.txt
snapshot_name=`cat /tmp/<db_instance_name>-snapshot.txt`
target_snapshot_name=`cat /tmp/<db_instance_name>-snapshot.txt | sed 's/rds://'`
@uniacid
uniacid / poker
Created February 3, 2018 07:13
Poker Nginx Vhost
server {
listen 80;
listen [::]:80;
server_name poker.local;
root /Users/steven.gonzalez/Sites/Pkr/monorepo/frontend/;
access_log /usr/local/etc/nginx/logs/poker.access.log main;
error_log /usr/local/etc/nginx/logs/poker.error.log warn;
location /apiws/rt {
@uniacid
uniacid / custom.cnf
Created January 9, 2018 01:17
gemaire mysql custom.cnf docker
[mysqld]
#innodb_buffer_pool_size=2G
### CACHES AND LIMITS #
back_log = 20
interactive_timeout = 7200
wait_timeout = 7200
net_read_timeout = 120
net_write_timeout = 300
sort_buffer_size = 2M
@uniacid
uniacid / cloudSettings
Last active August 17, 2018 03:05
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-08-17T03:05:28.282Z","extensionVersion":"v3.0.0"}
@uniacid
uniacid / launch.json
Created December 21, 2017 17:24
vscode php debug launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
DROP TEMPORARY TABLE IF EXISTS MRReport;
# Create temp table
CREATE TEMPORARY TABLE MRReport
# Insert Initial Data
SELECT
# MRR Year
`mntMRR`.MrrYear,
# MRR Month
`mntMRR`.MrrMonth,
# MRR Total
@uniacid
uniacid / fizzbuzz.php
Created November 18, 2017 06:57
Fizz Buzz
<?php
function fizzbizz()
{
for ($i = 0; $i <= 100; $i++) {
if ( ($i % 3 == 0) && ($i % 5 == 0) ) {
echo "FizzBuzz\r\n";
} elseif ($i % 3 == 0) {
echo "Fizz\r\n";
} elseif ($i % 5 == 0) {
echo "Buzz\r\n";
@uniacid
uniacid / pd2.lua
Created April 8, 2017 21:47
pd2s
chance = 70.71
bethigh = true
basebet = 0.00000022
firstlossbet = 0.00000222
secondlossbet = 0.00002222
thirdlossbet = 0.00022222
nextbet = basebet
counter=0
betcount=0
@uniacid
uniacid / Vagrantfile
Created March 3, 2017 20:19
Vagrant configuration file with OS detection - on windows we mount shared folders without NFS - on all other OS we use NFS for speeding up the project inside the virtual machine
# -*- mode: ruby -*-
# vi: set ft=ruby :
module OS
def OS.windows?
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
end
def OS.mac?
(/darwin/ =~ RUBY_PLATFORM) != nil
@uniacid
uniacid / autodl-irssi
Created January 13, 2017 18:48 — forked from phracker/autodl-irssi
A system init script for autodl-irssi
#!/bin/sh
# https://github.com/phracker
#
# AutoDL-Irssi Init Script
# Tested on Debian 7 (Wheezy)
# Instructions:
# - Install / configure irssi + autodl-irssi (duh)
# - Save this script as /etc/init.d/autodl-irssi
# - `chmod +x /etc/init.d/autodl-irssi`
# - `insserv autodl-irssi`