Skip to content

Instantly share code, notes, and snippets.

Tony Dinh trungdq88

Block or report user

Report or block trungdq88

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:fc06c6ea52a25a51bc07e70c8f781f8f
kubectl create poddisruptionbudget pdb-event --namespace=kube-system --selector k8s-app=event-exporter --max-unavailable 1
kubectl create poddisruptionbudget pdb-fluentd --namespace=kube-system --selector k8s-app=k8s-app: fluentd-gcp-scaler --max-unavailable 1
kubectl create poddisruptionbudget pdb-heapster --namespace=kube-system --selector k8s-app=heapster --max-unavailable 1
kubectl create poddisruptionbudget pdb-dns --namespace=kube-system --selector k8s-app=kube-dns --max-unavailable 1
kubectl create poddisruptionbudget pdb-dnsauto --namespace=kube-system --selector k8s-app=kube-dns-autoscaler --max-unavailable 1
kubectl create poddisruptionbudget pdb-glbc --namespace=kube-system --selector k8s-app=glbc --max-unavailable 1
kubectl create poddisrupt
ahmetb /
Last active Sep 6, 2019
Script to clean up Google Container Registry images pushed before a particular date
# Copyright © 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
pjambet / atomic.rb
Created May 31, 2017
Companion code for atomic operations in sql
View atomic.rb
require 'minitest/autorun'
require 'pg'
require 'mysql2'
require 'sequel'
def get_db(database_name)
case database_name
when :pg
when :mysql
tlrobinson / visualize-stacking-contexts.js
Last active Sep 10, 2019 — forked from eoinkelly/visualize-stacking-contexts.js
Some console output to help you visualise stacking contexts on a page (no jquery)
View visualize-stacking-contexts.js
* Paste this into your dev tools console (or even better as a snippet)
* It will parse the page and find all the things that create a new stacking context
and dump some info about them to the console. It will also outline them on the page.
* This is pretty rough and probably misses heaps of bugs and edge cases.
function highlight(el) {
CMCDragonkai /
Last active Aug 24, 2019
CLI: Job Control in ZSH and Bash

Job Control in ZSH and Bash

All processes in ZSH/Bash under job control are in 3 states: foregrounded, backgrounded and suspended.

# run command in the foreground
# run commend in the background
benjamincharity / gitGrepDirectory.bash
Created Feb 26, 2016
Git grep within a specific sub-directory.
View gitGrepDirectory.bash
# Search for `analytics` only inside `./src/app`
git grep analytics -- "./src/app/*"
staltz /
Last active Sep 20, 2019
The introduction to Reactive Programming you've been missing
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active Sep 18, 2019
Steps to install a Comodo PositiveSSL certificate with Nginx.
View install-comodo-ssl-cert-for-nginx.rst

Setting up a SSL Cert from Comodo

I use as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

edwinwebb / gist:5155504
Last active Feb 1, 2019
A simple less loop with comments and simple from, to syntax.
View gist:5155504
/* Define two variables as the loop limits */
@from : 0;
@to : 10;
/* Create a Parametric mixin and add a guard operation */
.loop(@index) when(@index =< @to) {
/* As the mixin is called CSS is outputted */
div:nth-child(@{index}) {
top: unit(@index * 100, px);
oivoodoo / routes.rake
Created Mar 5, 2013
rake task for printing grape routes.
View routes.rake
namespace :grape do
desc 'Print compiled grape routes'
task :routes => :environment do
API.routes.each do |route|
puts route
You can’t perform that action at this time.