Skip to content

Instantly share code, notes, and snippets.

View KarateJB's full-sized avatar
💭
May the Force be with you.

JB KarateJB

💭
May the Force be with you.
View GitHub Profile
@KarateJB
KarateJB / draggable.js
Created September 12, 2016 09:35 — forked from siongui/draggable.js
AngularJS draggable element (position must be absolute)
/**
* @see https://github.com/siongui/palidictionary/blob/master/static/js/draggable.js
* @see http://docs.angularjs.org/guide/compiler
*/
angular.module('draggableModule', []).
directive('draggable', ['$document' , function($document) {
return {
restrict: 'A',
link: function(scope, elm, attrs) {
@KarateJB
KarateJB / gist:0a1151ff5f3be3b969b4e8fd72d367ec
Created December 21, 2018 06:25 — forked from asabaylus/gist:3071099
Github Markdown Heading Anchors

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

@KarateJB
KarateJB / docker-cleanup-resources.md
Last active December 23, 2020 09:24 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

import hudson.model.*
def q = Jenkins.instance.queue
q.items.each {
if (it =~ /deploy-to/) {
q.cancel(it.task)
}
}
@KarateJB
KarateJB / axios-interceptors-refresh-token.js
Created August 23, 2019 10:31 — forked from mkjiau/axios-interceptors-refresh-token.js
Axios interceptors for token refreshing and more than 2 async requests available
let isRefreshing = false;
let refreshSubscribers = [];
const instance = axios.create({
baseURL: Config.API_URL,
});
instance.interceptors.response.use(response => {
return response;
}, error => {
@KarateJB
KarateJB / license-badges.md
Created October 3, 2019 02:06 — forked from lukas-h/license-badges.md
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

@KarateJB
KarateJB / k8s.conf
Created May 7, 2021 11:25 — forked from blachniet/k8s.conf
Ansible playbook to install Minikube on a VM with the "none" driver. Add your inventory in a file named `hosts`, then execute the playbook with `ansible-playbook --ask-become-pass -i hosts ./playbook.yml`
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
@KarateJB
KarateJB / gitflow-breakdown.md
Created August 26, 2021 15:36 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@KarateJB
KarateJB / Search my gists.md
Created September 2, 2021 05:18 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html