Skip to content

Instantly share code, notes, and snippets.

View flatanimals's full-sized avatar

Fletch F Fletch flatanimals

View GitHub Profile
@flatanimals
flatanimals / CallToSlackBot.php
Last active May 15, 2017 18:16
cheap laravel slackbot
<?php
// Notify Subscribers (who do we notify?)
$slackbot = new SlackBot();
$slackbot->notify(new ShitHappened($youCanPassDataToo));
@flatanimals
flatanimals / geoip-filter.conf
Created July 26, 2016 19:41
Nginx GeoIP Filtering
##
# GeoIP Filtering
##
## dat files: wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz
geoip_country /etc/nginx/geoip/GeoIP.dat;
geoip_city /etc/nginx/geoip/GeoLiteCity.dat;
map $geoip_country_code $allowed_country {
default no;
##
# Gzip Settings
##
# Compression
# Enable Gzip compressed.
gzip on;
# Enable compression both for HTTP/1.0 and HTTP/1.1.
@flatanimals
flatanimals / api.js
Last active August 29, 2015 14:22
[ React / ReactNative / fetch ] extract api calls into reusable package that can be used in both React & ReactNative
'use strict';
if (typeof fetch === 'undefined') {
console.info("Using Fetch Polyfill");
// Polyfill fetch for clients with no existing fetch implementation
//
// Uses github's fetch implementation
// https://github.com/github/fetch
@flatanimals
flatanimals / nginx.conf
Created January 13, 2015 14:56
Nginx server config for Laravel 4 and SimpleSamlphp
#
# Nginx host conf
#
# Allows Laravel 4 and SimpleSamlphp to exist together peacefully
#
# Laravel 4 -
# https://github.com/laravel/laravel
# SimpleSamlphp -
# https://github.com/simplesamlphp/simplesamlphp
#
@flatanimals
flatanimals / RedOctoberMode
Last active August 29, 2015 14:04
Red October Mode for Apple Messages
-- Red October Mode for Apple Messages
--
-- Fun away mode message with crazy ivans every 15 minute to make sure someone isn't following you
--
-- USE: save as an "Application" with the "Stay open after run handler" option checked
--
property resetmessage : 1 as integer
property previousturn : 0 as integer
@flatanimals
flatanimals / app.php
Last active September 27, 2017 09:52
[Phalcon + AWS SDK PHP] Autoload AWS and add to Dependency Injector example
<?php
/*
This example shows how to:
- Autoload AWS SDK PHP
- Add AWS SDK PHP to the Dependency Injector
- Retrieve AWS dependency from DI and make a call.