Skip to content

Instantly share code, notes, and snippets.

s.sort((a,b) => {
a = a.replace(/^[a-z]+:\/\//, '')
b = b.replace(/^[a-z]+:\/\//, '')
a = a.split("/")[0];
b = b.split("/")[0];
if (a.indexOf('.') === -1) return 1
if (b.indexOf('.') === -1) return -1
let aa = a.split("."),
bb = b.split("."),
@defektive
defektive / nginx.conf
Last active April 25, 2018 21:44 — forked from aterreno/nginx.conf
Let's say that for some reason you want to execute an OS command via HTTP...
worker_processes 1;
user root;
error_log /tmp/.nginx.log;
events {
worker_connections 1024;
}
http {
server {
listen 8080;
location / {
ls -la

Keybase proof

I hereby claim:

  • I am defektive on github.
  • I am defektive (https://keybase.io/defektive) on keybase.
  • I have a public key ASDufweLDBHGmWjMT5oqJNDh2oZgBn0bzfRIecllzTmSmwo

To claim this, I am signing this object:

#! /bin/bash
######################################################################
##x```
##|
##| .__ .__ .__ .__
##| ____________ ______ | |__ _____ ____ _____| |__ ____ | | | |
##| \_ __ \__ \ \____ \| | \\__ \ _/ __ \ / ___/ | \_/ __ \| | | |
##| | | \// __ \| |_> > Y \/ __ \\ ___/ \___ \| Y \ ___/| |_| |__
##| |__| (____ / __/|___| (____ /\___ >____ >___| /\___ >____/____/
##| \/|__| \/ \/ \/ \/ \/ \/
#! /bin/bash
############################################################
###### ********* Work Log ********** ######
############################################################
## - Manage your daily todos in a nice markdown format
## - Generate a report for [slack|stand]ups
############################################################
ACTION="view"
version: '2'
services:
web: &WEB
user: root
guard:
user: root
jobs:
user: root
#! /bin/bash
folder=$1
watchlist=$1/watchlist
sleep=$2
slack_post() {
message=$1
payload='payload={"channel": "#earl-earl-url", "username": "earlbot", "text": "'$message'", "icon_emoji": ":ghost:"}'
#! /bin/bash
user=$1
wordlist=$2
words=`cat $wordlist`
say "Okay $user. It's spelling time"
for word in $words; do
good=0
@defektive
defektive / .env
Created June 13, 2016 22:05
Canvas Dockerfile and docker-compose
COMPOSE_FILE=docker-compose.custom.yml