Skip to content

Instantly share code, notes, and snippets.

View ftdysa's full-sized avatar

Fred Dysart ftdysa

  • Automox
  • Denver, CO
View GitHub Profile
# Create a new Token
curl -u 'githubuser' -d '{"note":"Your Application"}' https://api.github.com/authorizations
# It is: "ebab4dc37e654bb230a9c69ebcd5f38e9a81e210"
#{
# "created_at": "2013-01-04T18:00:28Z",
# "app": {
# "url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api",
@ftdysa
ftdysa / SudoListener.php
Created April 8, 2015 19:01
response from controller event
class SudoListener {
public function onKernelController(FilterControllerEvent $event) {
$controller = $event->getController();
$token = $this->tokenStorage->getToken();
if ($token === null || ($user = $token->getUser()) === null) {
return;
}
if (!is_array($controller)) {
locations:
nxvl_7hetf84txck7:
location: '~ ^/(js|css|images|fonts)'
gzip_static: on
expires: 30d
add_header: 'Cache-Control public'
add_header: 'Last-Modified ""'
add_header: 'ETag ""'
access_log: off
@ftdysa
ftdysa / influxdb.conf
Created April 7, 2017 17:50 — forked from acherunilam/influxdb.conf
Nginx config for InfluxDB HA
http {
client_max_body_size 20M;
upstream influxdb {
server server1:8086;
server server2:8086;
}
upstream relay {
server server1:9096;
server server2:9096;