Skip to content

Instantly share code, notes, and snippets.

View dpb587's full-sized avatar

Danny Berger dpb587

View GitHub Profile
@magnetikonline
magnetikonline / README.md
Last active April 30, 2024 00:45
Setting Nginx FastCGI response buffer sizes.
@josegonzalez
josegonzalez / access.lua
Created December 3, 2012 18:26
Simple lua file enabling oauth support for nginx via nginx-lua and access_by_lua.
- certain endpoints are always blocked
if nginx_uri == "/_access_token" or nginx_uri == "/_me" then
ngx.exit(403)
end
-- import requirements
local cjson = require "cjson"
-- setup some app-level vars
local app_id = "APP_ID"
@nateware
nateware / nginx.conf
Last active November 23, 2021 10:54
Nginx sample config for EC2
#
# Sample nginx.conf optimized for EC2 c1.medium to xlarge instances.
# Also look at the haproxy.conf file for how the backend is balanced.
#
user "nginx" "nginx";
worker_processes 10;
error_log /var/log/nginx_error.log info;
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 9, 2024 06:43
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@immutef
immutef / SecurityController.php
Created October 27, 2010 09:58
Symfony2 Security Form Login
<?php // src/Application/UserBundle/Controller/SecurityController.php
namespace Application\UserBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller,
Symfony\Component\Security\SecurityContext;
class SecurityController extends Controller
{
public function loginAction()