Skip to content

Instantly share code, notes, and snippets.

@wirths
wirths / bitbucket-pipelines.yml
Created December 5, 2019 16:56
Bitbucket Pipelines - Create Pull Request (PR) with default reviewers
image: node:12
definitions:
steps:
- step: &create-pr
name: Create Pull Request
caches:
- node
script:
- apt-get update
@initcron
initcron / docker_install_debian.sh
Last active November 14, 2022 00:07
Install Docker on Debian. Run this as root.
#!/bin/sh
apt-get update
apt-get install -yq \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
@sameersbn
sameersbn / google-domains-dynamic-dns-update.sh
Created August 24, 2018 09:11 — forked from cyrusboadway/google-domains-dynamic-dns-update.sh
Script to update a Google Domains DNS record
#!/bin/bash
### Google Domains provides an API to update a DNS "Syntheitc record". This script
### updates a record with the script-runner's public IP, as resolved using a DNS
### lookup.
###
### Google Dynamic DNS: https://support.google.com/domains/answer/6147083
### Synthetic Records: https://support.google.com/domains/answer/6069273
USERNAME=""
@fearblackcat
fearblackcat / proxy_for_terminal.md
Last active April 13, 2024 18:53
Set proxy for terminal on mac

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
@angelo-v
angelo-v / jwt-decode.sh
Last active June 18, 2024 15:15
Decode a JWT via command line
# will not work in all cases, see https://gist.github.com/angelo-v/e0208a18d455e2e6ea3c40ad637aac53#gistcomment-3439904
function jwt-decode() {
sed 's/\./\n/g' <<< $(cut -d. -f1,2 <<< $1) | base64 --decode | jq
}
JWT=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ
jwt-decode $JWT
@simecek
simecek / rmagic_example.ipynb
Last active January 16, 2021 13:29
How to add R code to your (IPython) Jupyter Notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@so0k
so0k / kubectl.md
Last active April 25, 2024 12:40
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@mpneuried
mpneuried / Makefile
Last active May 4, 2024 13:46
Simple Makefile to build, run, tag and publish a docker containier to AWS-ECR
# import config.
# You can change the default config with `make cnf="config_special.env" build`
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# import deploy config
# You can change the default deploy config with `make cnf="deploy_special.env" release`
dpl ?= deploy.env
include $(dpl)
@mohamed-el-habib
mohamed-el-habib / 00_ReadMe.md
Last active April 10, 2020 10:21
drupal fpm with nginx and mysql

Usage

git clone git://github.com/fd57d8aa59b1574ee7728edf128814d3.git docker-drupal-fpm
cd docker-drupal-fpm
mkdir -p /usr/local/share/dockervolumes/drupal # if you change this folder please update the run.sh

chmod +x run.sh && ./run.sh up

@sameersbn
sameersbn / redmine-themes-install.sh
Last active May 17, 2022 15:33
Redmine Themes Installation
#!/bin/bash
#
# Author: Sameer Naik <sameer@damagehead.com>
# Gist: https://gist.github.com/sameersbn/aaa1b7bb064703c1e23c
# Short Url (raw): http://goo.gl/deKDpp
#
# Installs a bunch of themes for the docker-redmine image
#
# Usage:
# $ mkdir -p /opt/redmine/data/themes