Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -x
# Exit immediately if a command exits with a non-zero status.
set -e
if [ "$1" == "" ]; then
echo "Usage: $0 env"
exit 1
fi
commands:
make-check:
description: Runs tests
steps:
- restore_cache:
keys:
- go-mod-1-13-v1-{{ checksum "go.mod" }}-{{ checksum "go.sum" }}
- go-mod-1-13-v1-{{ checksum "go.mod" }}
- go-mod-1-13-v1-
- run:
version: 2.1
orbs:
swissknife: roopakv/swissknife@0.8.0
# These parameters are used to run various workflows via the API and
# are not used directly for every PR. by setting the below params
# we can for example run only staging integration tests.
parameters:
run_base_tests:
{
"background_color": "#ffffff",
"description": "It's what's happening. From breaking news and entertainment, sports and politics, to big events and everyday interests.",
"display": "standalone",
"gcm_sender_id": "49625052041",
"gcm_user_visible_only": true,
"icons": [
{
"src": "https://abs.twimg.com/responsive-web/web/icon-default.3c3b224a61f8b0e54.png",
"sizes": "192x192",
add_action( 'send_headers', function() {
header( 'Strict-Transport-Security: max-age=86400' );
});
@roopakv
roopakv / delayed_restart.sh
Created November 6, 2018 21:16
restart kubernetes pod with a script
echo "sleeping for ${SLEEP_TIME_BEFORE_RESTART:=86400} seconds"
sleep ${SLEEP_TIME_BEFORE_RESTART:=86400}s # Sleep for a day
curl -LO https://storage.googleapis.com/our-ops/artifacts/kubectl
chmod +x ./kubectl
if [ -z "$KUBE_DEPLOYMENT_TO_RESTART" ] || [ -z "$KUBE_CONTAINER_TO_SET_VAR" ]
then
echo "I haven't been told which deployment to restart! skipping"
else
@roopakv
roopakv / commands
Last active October 30, 2018 05:10
Add alphassl g2 intermediary to ca bundle
# Related issue: https://goo.gl/ieghhe
sudo wget https://secure.globalsign.com/cacert/gsalphasha2g2r1.crt -O /usr/share/ca-certificates/alphasslg2.crt
sudo openssl x509 -in /usr/share/ca-certificates/alphasslg2.crt -inform der -out /usr/share/ca-certificates/alphasslg2.pem -outform PEM
sudo echo 'alphasslg2.pem' >> /etc/ca-certificates.conf
sudo update-ca-certificates
# Telling yarn to use this new cert
yarn config set cafile '/etc/ssl/certs/ca-certificates.crt'
Verifying I am +roopakv on my passcard. https://onename.com/roopakv
@roopakv
roopakv / keybase.md
Last active December 31, 2017 23:56

Keybase proof

I hereby claim:

  • I am roopakv on github.
  • I am roopakv (https://keybase.io/roopakv) on keybase.
  • I have a public key ASD_bADd7BzilX2XmOY2YqbzVWsxzlbn-vhCP6xprLfmaQo

To claim this, I am signing this object: