Skip to content

Instantly share code, notes, and snippets.

@thikade
thikade / bootstrap_3_full_class_list
Created October 14, 2015 19:52 — forked from cosmicscr/bootstrap_3_full_class_list
bootstrap 3 full class list
Here are all the classes from Bootstrap 3 (version 3.1.1).
Method of extraction:
1. Download Bootstrap 3 and rename bootstrap.css as "bootstrap.html"
2. Add the following 24 lines of code to the very bottom of the bootstrap.html file:
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js"></script>
<script>
@thikade
thikade / createurls.py
Created December 7, 2016 13:45 — forked from bkonkle/createurls.py
A script to create urls for Jmeter testing from your Apache access logs.
#!/usr/bin/env python
"""
Requires apachelog. `pip install apachelog`
"""
from __future__ import with_statement
import apachelog
import csv
import re
import sys
from optparse import OptionParser
@thikade
thikade / gist-reveal.it-slides.html
Created February 16, 2018 18:10 — forked from ryanj/gist-reveal.it-slides.html
Gist-powered Revealjs slideshow presentations http://gist-reveal.it
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Gist-Powered</h2>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<br/>
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1>
</section>
<section data-background-transition='zoom' data-transition='linear' id='try-it'>
<h2>Try it out!</h2>
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p>
@thikade
thikade / openshift-cheatsheet.md
Created April 3, 2018 09:21 — forked from rafaeltuelho/openshift-cheatsheet.md
My Openshift Cheatsheet
  • Binary Builds
oc new-build --binary=true --name=ola2 --image-stream=redhat-openjdk18-openshift
oc start-build ola2 --from-file=./target/ola.jar --follow
oc new-app 
  • Turn off/on DC triggers to do a batch of changes without spam many deployments
@thikade
thikade / how-to-squash-commits-in-git.md
Last active March 27, 2020 15:11 — forked from patik/how-to-squash-commits-in-git.md
How to squash commits in git

Squashing Git Commits

The standard way that produces a single commit.

Use merge --squash to squash multiple commits into a single commit (without a merge commit!). Omitting -m at the final commit command will display all commit messages of bugfix branch and lets you edit the new commit message.

Switch to the master branch and make sure you are up to date:

git checkout master &amp;&amp; git pull
@thikade
thikade / openshift_cli_tricks.MD
Last active April 3, 2020 13:34 — forked from tuxfight3r/openshift_cli_tricks.MD
openshift cli tricks - using go templates

openshift list all pods and their specs (requests/limits)

oc get pod -o jsonpath='{range .items[*]}{"SPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n"}{end}'

openshift list all pods and their specs with name (requests /limits)

oc get pod -o jsonpath='{range .items[*]}{"NAME:  "}{.metadata.name}{"\nSPEC:  \n  LIMITS  : "}{.spec.containers[*].resources.limits}{"\n  REQUESTS: "}{.spec.containers[*].resources.requests}{"\n\n"}{end}'
@thikade
thikade / deleteOpenshiftSampleJob.groovy
Last active May 14, 2020 12:24 — forked from nextrevision/deleteJenkinsJobs.groovy
Groovy script to delete all jenkins jobs that match a regex pattern
import jenkins.model.*
def matchedJobs = Jenkins.instance.items.findAll { job ->
job.name =~ /^OpenShift sample$/
}
matchedJobs.each { job ->
println "jobs: ${job.name}"
//job.delete()
}
@thikade
thikade / gitBash_windows.md
Created October 30, 2020 17:31 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so

@thikade
thikade / etcd-backup-cron.yaml
Created April 2, 2021 22:43 — forked from dmc5179/etcd-backup-cron.yaml
OpenShift Cron job to backup etcd database
---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: etcd-backup
spec:
schedule: "0 0 * * *"
jobTemplate:
spec:
template:
@thikade
thikade / k8s-patch-virtualservice.go
Created May 11, 2021 14:14 — forked from dwmkerr/k8s-patch-virtualservice.go
Example showing how to patch an Istio VirtualService CRDs Golang
// Example showing how to patch Kubernetes resources.
package main
import (
"encoding/json"
"fmt"
"k8s.io/apimachinery/pkg/runtime/schema"
types "k8s.io/apimachinery/pkg/types"
"k8s.io/client-go/dynamic"