Skip to content

Instantly share code, notes, and snippets.

View badcrocodile's full-sized avatar

Jason badcrocodile

  • The Motley Fool
  • Austin, Texas
View GitHub Profile
@badcrocodile
badcrocodile / common.css
Last active May 2, 2018 16:06 — forked from TwisterMc/common.css
Vivaldi Tab Loading Indicator
/* append this to the bottom of the common.css file */
/* via https://forum.vivaldi.net/topic/6289/tab-loading-indicator/24?page=2 */
/* Applications/Vivaldi/Contents/Versions/1.1323.4343/vivaldi/style/common.css
@keyframes fade{
from {opacity:1}
to {opacity:0.4}
}
/* Either pulse the "X"... */
.button-toolbar.reload.loading svg{
animation-name: fade;
@badcrocodile
badcrocodile / post-merge
Last active June 22, 2016 18:02 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed.In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed.Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
#/usr/bin/env bash
# MIT © Sindre Sorhus - sindresorhus.com
# Forked by badcrocodile to check for changed files in a specified directory
# git hook to run a command after `git pull` if any files in a specified directory have been changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
@badcrocodile
badcrocodile / 0_reuse_code.js
Created February 4, 2016 18:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@badcrocodile
badcrocodile / slack_notification.php
Created October 29, 2015 14:27 — forked from alexstone/slack_notification.php
Fire a Slack Notification via CURL
<?php
// (string) $message - message to be passed to Slack
// (string) $room - room in which to write the message, too
// (string) $icon - You can set up custom emoji icons to use with each message
public static function slack($message, $room = "engineering", $icon = ":longbox:") {
$room = ($room) ? $room : "engineering";
$data = "payload=" . json_encode(array(
"channel" => "#{$room}",
"text" => $message,

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@badcrocodile
badcrocodile / index.html
Last active August 29, 2015 14:05 — forked from anonymous/index.html
Center text vertically
<div>
<span>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</span>
</div>