Skip to content

Instantly share code, notes, and snippets.

View jadia's full-sized avatar
💭
Progress beats Perfect.

Nitish Jadia jadia

💭
Progress beats Perfect.
View GitHub Profile
@adelmofilho
adelmofilho / docker-compose.jenkins-dind.yml
Created June 21, 2020 00:17
Docker-in-Docker approach to run Jenkins as a Docker container
# This docker-compose file intent to create a multi-container application
# that runs a Jenkins container connected via TLS to a Docker-in-Docker (dind) container as Docker daemon.
#
# Advice about this approach can be found at:
# http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/
#
# As well discussion about another alternatives on this setup can be found at:
# https://forums.docker.com/t/using-docker-in-a-dockerized-jenkins-container/322/11
#
# Quick reference about Docker-in-Docker can be fount at:
#!/usr/bin/env sh
if test ! -d ./overlay; then
read -p "No overlay found here. Want to create one? (y/N)" yn
case $yn in
[Yy]* ) install -d overlay/upperdir && install -d overlay/workdir && install -d overlay/mnt; break;;
* ) exit;;
esac
fi
@arunbsar
arunbsar / kubectl.md
Last active November 7, 2019 16:21
kubectl shortcuts

kubectl shortcuts i use in .bashrc

alias k="kubectl"
alias kg="kubectl get"
alias kc="kubectl create"
alias kgp="kubectl get pods"
export ks="-n kube-system"
export all="--all-namespaces"
export y="-o yaml"
export j="-o json"
@diegopacheco
diegopacheco / colorls-ubuntu-linux.ruby.md
Created July 10, 2017 20:58
How to Install Ruby colorls on Ubuntu 17.4?
sudo apt install -y ruby ruby-dev ruby-colorize
sudo apt-get install -y libncurses5-dev libtinfo-dev
sudo gem install colorls
colorls -r
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active May 10, 2024 20:54
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@nwaywood
nwaywood / bash-menu.sh
Created March 15, 2017 03:47
Template structure for a bash script with simple menu and command line args
#! /bin/bash
# ===================
# Script funtionality
# ===================
# do something
doSomething() {
echo 'doing something'
}
@ryancdotorg
ryancdotorg / frag32.py
Created August 20, 2015 16:27
A FAT32 fragmenter, because I am a horrible person.
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)
@aamnah
aamnah / jekyll-new-post-advanced
Last active January 19, 2023 13:00
Bash script to create new Jekyll posts
#!/bin/bash
# About: Bash script to create new Jekyll posts
# Author: @AamnahAkram
# URL: https://gist.github.com/aamnah/f89fca7906f66f6f6a12
# Description: This is a more advanced version of the script which can
# - take options
# - has color coded status messages
# - improved code
# - lowercase permalinks
# - usage message
@caseywatts
caseywatts / bookmarkleting.md
Last active May 5, 2024 10:18
Making Bookmarklets

This is one chapter of my "Chrome Extension Workshops" tutorial, see the rest here: https://gist.github.com/caseywatts/8eec8ff974dee9f3b247

Unrelated update: my book is out! Debugging Your Brain is an applied psychology / self-help book

Making Bookmarklets

I'm feeling very clever. I've got this sweet line of javascript that replaces "cloud" with "butt". My mom would LOVE this, but she doesn't computer very well. I'm afraid to show her the Developer Console and have her type/paste this in. But she IS pretty good at bookmarks, she knows just how to click those!

A bookmark normally takes you to a new web page. A bookmarklet is a bookmark that runs javascript on the current page instead of taking you to a new page. To declare that it is a bookmarklet, the "location" it points to starts with javascript:.

@FlyingJester
FlyingJester / randomize_background.py
Last active January 15, 2022 05:13
A script that uses `feh` to randomly set the desktop background, changing it every 5 minutes, and not repeating any image twice.
# Calls Feh, puts a randomized image on the background, and changes
# the image every 5 minutes.
import os
import glob
import subprocess
import time
import random
images = glob.glob('images/*')