Skip to content

Instantly share code, notes, and snippets.


John Santiago Jr. jdsantiagojr

View GitHub Profile
sandcastle / redirect-ingress.yml
Created Aug 27, 2017
An example of a ingress redirect using kubernetes and nginx `configuration-snippet`
View redirect-ingress.yml
kind: Ingress
apiVersion: extensions/v1beta1
name: redirect-ingress
annotations: |
if ($host ~ ^(.+)\.somedomain\.io$) {
return 301 https://$$request_uri;
ndbroadbent / rn-i18n-locale-identifiers.csv
Last active Dec 20, 2020 — forked from jasef/ioslocaleidentifiers.csv
React Native i18n Locale Identifiers
View rn-i18n-locale-identifiers.csv
Locale Identifier Description
af Afrikaans
af-NA Afrikaans (Namibia)
af-ZA Afrikaans (South Africa)
agq Aghem
agq-CM Aghem (Cameroon)
ak Akan
ak-GH Akan (Ghana)
am Amharic
am-ET Amharic (Ethiopia)
andyshinn / Dockerfile
Created Dec 24, 2015
BusyBox cron container example
View Dockerfile
FROM gliderlabs/alpine:3.3
COPY myawesomescript /bin/myawesomescript
COPY root /var/spool/cron/crontabs/root
RUN chmod +x /bin/myawesomescript
CMD crond -l 2 -f
drgarcia1986 /
Last active Aug 25, 2020
Example of OAuth2 autentication server with Client Credentials grant (using python-oauth2 and tornado)
# !/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'Diego Garcia'
import tornado.web
import tornado.ioloop
import oauth2.tokengenerator
import oauth2.grant
youssman / regex-camelCase-to-dash.js
Created Nov 5, 2014
Javascript convert camelcase to dash (hyphen)
View regex-camelCase-to-dash.js
function camelCaseToDash( myStr ) {
return myStr.replace( /([a-z])([A-Z])/g, '$1-$2' ).toLowerCase();
var myStr = camelCaseToDash( 'thisString' );
alert( myStr ); // => this-string
View 1-restify-server-cheatsheet.js
// Restify Server CheatSheet.
// More about the API:
// Install restify with npm install restify
// 1.1. Creating a Server.
var restify = require('restify');
arvidfm /
Last active Dec 4, 2018
Running Tornado on asyncio's event loop, including 'yield from' support in request handlers
import asyncio
import tornado.concurrent
import tornado.ioloop
import tornado.web
import tornado.platform.asyncio
import tornado.httpclient
class ReqHandler(tornado.web.RequestHandler):
async def get(self):
nisaacson / .tern-project
Created Feb 26, 2014
Use tern with vim for node.js development.
View .tern-project
"libs": [
"plugins": {
"node": {}
toolmantim / Makefile
Last active Jan 9, 2021
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
View Makefile
# A simple Makefile alternative to using Grunt for your static asset compilation
## Usage
# $ npm install
# And then you can run various commands:
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
murtaugh / cursor-reset.css
Last active Feb 17, 2020
CSS Cursor Reset
View cursor-reset.css
body {
cursor: default;
code {
cursor: text;
You can’t perform that action at this time.