Skip to content

Instantly share code, notes, and snippets.

View subinamathew's full-sized avatar
🏠
Working from home

subinamathew subinamathew

🏠
Working from home
View GitHub Profile
FROM node:10
LABEL maintainer="Luca Perret <perret.luca@gmail.com>" \
org.label-schema.vendor="Strapi" \
org.label-schema.name="Strapi Docker image" \
org.label-schema.description="Strapi containerized" \
org.label-schema.url="https://strapi.io" \
org.label-schema.vcs-url="https://github.com/strapi/strapi-docker" \
org.label-schema.version=latest \
org.label-schema.schema-version="1.0"
package main
import (
"flag"
"log"
"net/http"
"strings"
)
// FileSystem custom file system handler
@dmarmugi
dmarmugi / stopCFAppsInSpace.sh
Created August 23, 2017 20:15
Stop all Cloud Foundry apps in a space
cf apps | grep started | awk '{print $1}{system("cf sp " $1)}'
@haroldtreen
haroldtreen / promise-test.js
Last active August 25, 2023 13:59
Testing promise rejection with Mocha
const { assert } = require('chai');
function isError(e) {
if (typeof e === 'string') {
return Promise.reject(new Error(e));
}
return Promise.resolve(e);
}
@tylerneylon
tylerneylon / json.lua
Last active July 9, 2024 03:25
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@vratiu
vratiu / .bash_aliases
Last active July 15, 2024 10:23
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset