Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View digitaljhelms's full-sized avatar

Jeremy Helms digitaljhelms

  • USA
View GitHub Profile
// create a bookmark and use this code as the URL, you can now toggle the css on/off
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3
javascript: (function() {
var elements = document.body.getElementsByTagName('*');
var items = [];
for (var i = 0; i < elements.length; i++) {
if (elements[i].innerHTML.indexOf('* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }') != -1) {
items.push(elements[i]);
}
}
@hfossli
hfossli / standard.sh
Last active February 8, 2024 05:19
Standard bash script format
#!/bin/bash
CLEAR='\033[0m'
RED='\033[0;31m'
function usage() {
if [ -n "$1" ]; then
echo -e "${RED}👉 $1${CLEAR}\n";
fi
echo "Usage: $0 [-n number-of-people] [-s section-id] [-c cache-file]"
" Make IE Better Compatible "
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
======================================================
IE6 Only
==================
_selector {...}
@weotch
weotch / blah.md
Last active September 18, 2017 22:02
Slack "material" theme
#263238,#295154,#294547,#80CBC4,#326063,#AEBDC4,#80CBC4,#80CBC4

@mroderick
mroderick / find-old-branches.sh
Last active April 11, 2024 19:49
A small script to find stale branches
#!/bin/bash
# This is a very naive script, it doesn't do grouping and returns all branches
# I only really care about branches that have not seen commits in two months
#
# I am hoping to find some time to write a tool that can output these reports for me
# In the meantime, I am using this
echo "Merged branches"
for branch in `git branch -r --merged | grep -v HEAD`;do echo -e `git log --no-merges -n 1 --format="%ci, %cr, %an, %ae, " $branch | head -n 1` \\t$branch; done | sort -r
@yuval-a
yuval-a / js-micro.js
Last active January 7, 2024 18:38
Javascript micro-optimizations
NOTE: This document is OLD - and most of the tips here are probably outdated, since newer versions of Javascript have been
released over the years - with newer optimizations and more emphasis on optimizing newly supported syntax.
// Array literal (= []) is faster than Array constructor (new Array())
// http://jsperf.com/new-array-vs-literal/15
var array = [];
// Object literal (={}) is faster than Object constructor (new Object())
// http://jsperf.com/new-array-vs-literal/26
@lfender6445
lfender6445 / gist:70b00c97df43827279f7
Last active September 12, 2018 07:50
Never go idle in hipchat - Disable hipchat idle when away from computer
#! /bin/bash
# This if for the mac hipchat client
# To setup, download this file to any folder and save as `hip.sh`
# change the permissions of the file so it is executable using terminal
# You can do this by running `chmod u+x ./hip.sh`
# Now you can run `./hip.sh`
echo 'Hipchat hooray...ho... - Press CTRL+C to stop'
while :
do
@jakeonrails
jakeonrails / Ruby Notepad Bookmarklet
Created January 29, 2013 18:08
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@paulmillr
paulmillr / Gruntfile.js
Created September 11, 2012 10:11
yeoman default config
module.exports = function( grunt ) {
'use strict';
//
// Grunt configuration:
//
// https://github.com/cowboy/grunt/blob/master/docs/getting_started.md
//
grunt.initConfig({
// Project configuration