This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add the following in .zshrc: | |
... | |
plugins=(osx git zsh-autosuggestions zsh-syntax-highlighting zsh-nvm docker kubectl) | |
... | |
### Fix slowness of pastes with zsh-syntax-highlighting.zsh | |
pasteinit() { | |
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Author: Stefan Buck | |
# License: MIT | |
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
# | |
# | |
# This script accepts the following parameters: | |
# | |
# * owner |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- how to use: | |
-- redis-cli EVAL "$(cat redis-idle-clean.lua)" 2 key_name 86400 | |
local keyTemplate = KEYS[1] | |
local keyMinIdleTime = tonumber(KEYS[2]) | |
local function getUsedMemory() | |
local info = redis.call('info') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Serverless Offline", | |
"cwd": "${workspaceRoot}", | |
"runtimeExecutable": "npm", | |
"runtimeArgs": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"start": "./node_modules/.bin/serverless offline start -s dev", | |
"debug": "export SLS_DEBUG=* && node --inspect ./node_modules/.bin/serverless offline start", | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# agnoster's Theme - https://gist.github.com/3712874 | |
# A Powerline-inspired theme for ZSH | |
# | |
# Forked by rjorgenson - http://github.com/rjorgenson | |
# | |
# # README | |
# | |
# In order for this theme to render correctly, you will need a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
swagger: "2.0" | |
host: | |
basePath: /v2 | |
info: | |
version: | |
title: | |
license: | |
name: | |
contact: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const contacts_post = (event, context, callback) => { | |
console.log('event', event); | |
// Write scope as its a POST | |
const requested_scope = ['write:contacts']; | |
//No token check | |
if (!event.authorizationToken) { | |
return callback('Unauthorized') | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GLOBAL_ENV_VARS=$(cat ${WORKSPACE}/conf/aws.${AWS_CONF} | grep =) | |
#Remove any comments from GLOBAL_ENV_VARS | |
GLOBAL_ENV_VARS=$(echo "$GLOBAL_ENV_VARS" | sed 's/#.*//g') | |
#To override any values in GLOBAL_ENV_VARS | |
GLOBAL_ENV_VARS=$(echo "$GLOBAL_ENV_VARS" | sed "s/key_name=.*/key_name=${NONPROD_KEY_NAME}/g") | |
ansible-playbook -vvv ansible/axway_cf.yml --extra-vars " | |
$GLOBAL_ENV_VARS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This is a trick, to output the bash commands we need to run in shell, and just execute this script inside an eval within our shell, so it imports what we need | |
# Possibly tie this in with https://gist.github.com/mbainter/b38a4cb411c0b5c1bae6 for MFA support | |
# Will need to durably store MFA access tokens, possibly in some other env vars | |
# Could also store all different keys/info in different vars, to reuse as needed (lots of env vars though, file may be better) | |
import os | |
import sys | |
import getpass |
NewerOlder