Skip to content

Instantly share code, notes, and snippets.

View fribibb's full-sized avatar

Tim Hurley fribibb

View GitHub Profile
@fribibb
fribibb / _mixins.scss
Last active June 25, 2018 00:21
Sass Mixins
// iOS style background blurring
// TODO: update as more support available
@mixin blur-bg($blur-amount: 10px) {
-webkit-backdrop-filter: blur($blur-amount);
backdrop-filter: blur($blur-amount);
}
// Usage:
// @include blur-bg;
// @include blur-bg(4px);
@fribibb
fribibb / govcms-site-sync.sh
Last active November 2, 2017 00:39
govCMS Site Sync
#!/bin/bash
# Expects x paramters (drush alias of remote site | netXXX number | docroot of local instance | DB name)
# e.g. bash ~/govcms-site-sync.sh govcms.sprintgovcms.govcms.acsitefactory.com 2111 ~/Desktop/govCMS/govcms.local govcms
clear
if [ "$#" != "4" ]; then
echo "Requires 4 Paramters: "
// Pretty broken images
//
// Based off:
// http://bitsofco.de/styling-broken-images/
img {
min-height: 50px;
font-family: 'Helvetica', sans-serif;
font-weight: 300;
line-height: 2;
// from https://gist.github.com/jameschens
function human_filesize($size, $precision = 2) {
for($i = 0; ($size / 1024) > 0.9; $i++, $size /= 1024) {}
return round($size, $precision).['B','kB','MB','GB','TB','PB','EB','ZB','YB'][$i];
}
# simply run:
# curl https://gist.githubusercontent.com/fribibb/74f8b9fa5835738fb1eb123c0d6ed93d/raw/Basic-Mac-Setup--Work.sh > ~/Desktop/Basic-Mac-Setup--Work.sh && bash ~/Desktop/Basic-Mac-Setup--Work.sh
# Starting
clear
echo "This will kick off a LOT of downloads."
echo "...distract everyone with [tea/coffee/cake/lunch/fire alarms], so you can use all the bandwidths!"
echo ""
read -p "Press enter to start."
// from: https://css-tricks.com/glitch-effect-text-images-svg/
/*
(TEXT) PARAMS
=================
1. Namespace
2. Intensity
3. Text color
4. Background color (flat)
5. Highlight #1 color
@fribibb
fribibb / govcms-all-sites-check.js
Last active November 2, 2017 00:39
Crawl the all sites page and check each site is up
// Run with:
// casperjs govcms-all-sites-check.js
// First will get all links from a page
// then save 'href' attributes to an array,
// then will iterate over this array and then open each link one by one
// and echo the response code, url and title
/*
Based of http://blog.mojotech.com/
*/
.post-content>p:first-of-type:first-letter {
background-color: #28ba00;
border-radius: 3px;
color: #fff;
float: left;
font-size: 46px;
#!/bin/bash
#eg: bash ~/govcms-alias-creator-4000.sh "Tim" abc123abc123
# API keys
USER=$1
KEY=$2
# Variables.
SERVER=${3:-production}
<!-- from: http://www.creativebloq.com/features/the-pro-s-guide-to-responsive-web-design -->
<img
<!-- Declare the fallback image for all non picture supporting browsers -->
src="horse-350.jpg"
<!-- Declare all of the image sizes in srcset. Include the image width using the w descriptor to inform the browser of the width of each image.-->
srcset="horse-350.jpg 350w,
horse-500.jpg 500w,
horse-1024.jpg 1024w,
horse.jpg 2000w"