Skip to content

Instantly share code, notes, and snippets.

View geordee's full-sized avatar
🔥

Geordee Naliyath geordee

🔥
View GitHub Profile
# Assumptions:
* Rails 3.2.x
* nginx
* capistrano deploy
* "X-Accel-Mapping header missing" messages in nginx error.log file
* You want to serve static files with nginx instead of Rails
# nginx configuration:
@geordee
geordee / styles.less
Created April 11, 2014 08:33 — forked from staydecent/styles.less
Compact Tab Bar for Atom Editor
.tab-bar {
height: 32px;
padding: 0;
.tab {
-webkit-transform: none;
top: 1px;
left: 2px;
line-height: 25px;
@geordee
geordee / batch-api-min.conf
Created August 25, 2018 04:23 — forked from nginx-gists/batch-api-min.conf
Batching API Requests with NGINX Plus and the NGINX JavaScript Module
js_include batch-api-min.js;
# keyval_zone for APIs where the last portion of the URI is an argument
# The key is the portion of the URL before the last part
keyval_zone zone=batch_api:64k state=/etc/nginx/state-files/batch-api.json;
keyval $uri_prefix $batch_api zone=batch_api;
# keyval_zone for APIs where the last portion of the URI is an argument
# The key is the URI
keyval_zone zone=batch_api2:64k state=/etc/nginx/state-files/batch-api2.json;
@geordee
geordee / README.md
Created August 25, 2018 05:06 — forked from magnetikonline/README.md
Nginx embedded variables.
@geordee
geordee / semaphore.go
Created December 28, 2022 10:17 — forked from lxwagn/semaphore.go
Idiomatic semaphore example in Go (using Buffered Channels)
// Idiomatic Semaphore Example in Go
// Lucas Wagner
// Golang has no built-in facility to implement semaphores, so a common design
// pattern is to use buffered channels.
package main
import (
"fmt"