Skip to content

Instantly share code, notes, and snippets.

View omkar0001's full-sized avatar

omkar omkar0001

  • Instafrsh
  • Gurgaon
View GitHub Profile
@omkar0001
omkar0001 / remove-docker-images.sh
Created October 13, 2018 11:42
Removes the docker images manually.
#!/bin/sh
set -e
dir="$1"
if [ -z "$dir" ]; then
{
echo 'This script is for destroying old /var/lib/docker directories more safely than'
echo ' "rm -rf", which can cause data loss or other serious issues.'
echo
@omkar0001
omkar0001 / fzf-utils
Created October 6, 2019 21:25
FZF utils
#!/usr/bin/env zsh
# fd - cd to selected directory
fd() {
local dir
dir=$(find ${1:-.} -path '*/\.*' -prune \
-o -type d -print 2> /dev/null | fzf +m) &&
cd "$dir"
}
# Kubernetes usefulness.
alias kubeprod='kubectl config use-context gke_typegenie_europe-west1-d_production'
alias kubestag='kubectl config use-context gke_typegenie_europe-west1-b_staging'
eval $(kubectl completion zsh)
alias kubectx="kubectl config current-context"
# Shells into a service on the current kubernetes cluster
function kubesh {
local service=${1:?"Service name must be arg1"}

Pre-requisites

To change any style of an element on the home page

  • Edit {project_dir}/css/theme_additional.scss
  • Generate css file theme-additional.css

Requirements:

  • Ability to change the settings from the backend for different states, without changing the backend.
    • name:
    • show_completions: Should we show the completions?
    • popup_on_every_session: Should we show the popup on every session?
    • status_code: Override the default status code.
    • message:
  • Initially should be able to support the below states.
    • ADMIN_NOT_AUTHORIZED
    • NOT_AUTHENTICATED
We can't make this file beautiful and searchable because it's too large.
TractId,State,County,TotalPop,Men,Women,Hispanic,White,Black,Native,Asian,Pacific,VotingAgeCitizen,Income,IncomeErr,IncomePerCap,IncomePerCapErr,Poverty,ChildPoverty,Professional,Service,Office,Construction,Production,Drive,Carpool,Transit,Walk,OtherTransp,WorkAtHome,MeanCommute,Employed,PrivateWork,PublicWork,SelfEmployed,FamilyWork,Unemployment
1001020100,Alabama,Autauga County,1845,899,946,2.4,86.3,5.2,0.0,1.2,0.0,1407,67826.0,14560.0,33018.0,6294.0,10.7,20.8,38.5,15.6,22.8,10.8,12.4,94.2,3.3,0.0,0.5,0.0,2.1,24.5,881,74.2,21.2,4.5,0.0,4.6
1001020200,Alabama,Autauga County,2172,1167,1005,1.1,41.6,54.5,0.0,1.0,0.0,1652,41287.0,3819.0,18996.0,2453.0,22.4,35.8,30.5,24.9,22.9,6.3,15.4,90.5,9.1,0.0,0.0,0.5,0.0,22.2,852,75.9,15.0,9.0,0.0,3.4
1001020300,Alabama,Autauga County,3385,1533,1852,8.0,61.4,26.5,0.6,0.7,0.4,2480,46806.0,9496.0,21236.0,2562.0,14.7,21.1,27.9,19.4,33.3,9.9,9.6,88.3,8.4,0.0,1.0,0.8,1.5,23.1,1482,73.3,21.1,4.8,0.7,4.7