This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
background: #f06; | |
background: linear-gradient(45deg, #f06, yellow); | |
min-height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var uriNames = 'protocol hostname host pathname port search hash href origin'.split( ' ' ); | |
var parseUri = function( url ) { | |
var Uri = function uri() { | |
var self = this, | |
setProp = function( nm, val ) { | |
if ( nm === 'search' ) { | |
val = ( String( val )[ 0 ] !== '?' ) ? '?' + val : val; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# *** RUN AS ROOT *** | |
# Define help function | |
function help(){ | |
echo "Node JS Install Script - Install Node JS"; | |
echo "Usage example:"; | |
echo "install-node (-v|--version) string [(-f|--force)] [(-p|--platform) string] [(-a|--arch) string]"; | |
echo "Options:"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dockerstop () { | |
local ID=`docker ps -aqf name=$1` | |
if [ ! -z "$ID" ] | |
then | |
echo "STOPING/REMOVING CONTAINER: $ID ($1)..." | |
docker stop "$ID" && docker rm "$ID" | |
else | |
echo "CONTAINER '$1' NOT FOUND" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Detailed ls list to less in color | |
if ls --color -d . >/dev/null 2>&1; then | |
# GNU | |
alias L="ls --color -l | less -r" | |
elif ls -G -d . >/dev/null 2>&1; then | |
# BSD | |
alias L="CLICOLOR_FORCE=1 ls -l | less -r" | |
fi | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function( p, u, q ) { | |
p = document.location.search.substr( 1 ).split( '&' ); | |
u = 'https://www.bing.com/images/search?q='; | |
if ( p ) { | |
q = p.filter( a => String( a ).startsWith( 'q=' ) ); | |
if ( q && q.length ) { | |
q = q[ 0 ].replace( 'q=', '' ); | |
window.document.location = u + q; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( ( w, d, s1, s2, b, cN ) => { | |
const GS = ( src, d ) => { | |
d = document; | |
return new Promise( ( resolve, reject ) => { | |
s = d.createElement( 'script' ); | |
s.type = 'text/javascript'; | |
s.async = true; | |
s.onload = () => resolve(); | |
s.src = src; | |
d.getElementsByTagName( 'head' )[ 0 ].appendChild( s ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# REF: https://github.com/JanisVepris/dot-files/blob/master/scripts/deleteBranches | |
COUNT=0 | |
BRANCHES=( $(git branch | grep -e "^[^*].*") ) | |
HEIGHT=30 | |
WIDTH=80 | |
CHOICE_HEIGHT=28 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( ( w, l, lo, p, qp ) => { | |
l = window.location; | |
lo = new URL(l); | |
p = l.search; | |
qp = new URLSearchParams(p); | |
qp.append('disable_polymer', '1'); | |
qp.append('flow', 'list'); | |
lo.search = '?' + qp.toString(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Assume JQ is already installed | |
if ! builtin type -p 'yay' >/dev/null 2>&1; then | |
echo 'Install yay.' | |
TMPDIR="$(mktemp -d)" | |
cd "${TMPDIR}" || return 1 |
OlderNewer