Skip to content

Instantly share code, notes, and snippets.

View graphicagenda's full-sized avatar
🥳
Just upgraded to GIt Pro

Shining Bright Diamond graphicagenda

🥳
Just upgraded to GIt Pro
View GitHub Profile
@graphicagenda
graphicagenda / _html_entities.scss
Last active November 29, 2019 22:43 — forked from apisandipas/_html_entities.scss
[HTML Entities map] The pseudo-element 'content' property doesnt accept normal (») style HTML entities. These variables below easy the pain of looking up the HEX codes... #LegacyGISTS #starred
/**
* The pseudo-element 'content' property doesnt accept normal (») style
* HTML entities. These variables below easy the pain of looking up the HEX codes...
*
* Referenced from http://www.danshort.com/HTMLentities/
*
* TODO: Add all the other entities? Worth it? Some day? Maybe?
*/
// Punctuation
@graphicagenda
graphicagenda / include-header.php
Last active November 29, 2019 22:41
[include-header] #LegacyGISTS
require_once("../wp-config.php");
$wp->init(); $wp->parse_request(); $wp->query_posts();
$wp->register_globals(); $wp->send_headers();
@graphicagenda
graphicagenda / El Capitan Daily Update
Last active November 29, 2019 22:40
[Daily Update in the terminal] #LegacyGISTS
sudo which brew && sudo chown -R $(whoami):admin /usr/local && brew update && brew upgrade --all && brew cleanup && sudo composer self-update && sudo gem update --system -n /usr/local/bin && sudo gem update -n /usr/local/bin && sudo npm update -g
@graphicagenda
graphicagenda / jQuery HTML5 placeholder fix.js
Last active November 29, 2019 22:40 — forked from hagenburger/jQuery HTML5 placeholder fix.js
[jQuery HTML5 placeholder fix] #LegacyGISTS
// @via https://gist.github.com/hagenburger/379601
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
@graphicagenda
graphicagenda / imagesQueue.js
Last active November 29, 2019 22:39 — forked from kamui/imagesQueue.js
[imagesQueue.js] #LegacyGISTS
/*
imagesQueue.js FULL SOURCE
A simple, cross-browser, *parallel* images loader object.
Check http://labs.lieldulev.com/imagesQueue/ for more details.
*/
imagesQ={
onComplete: function(){} // Fires when all finished loading
,onLoaded: function(){} // Fires when an image finishes loading
,onErrored: function(){} // Fires when an image fails to load
,current: null // Last loaded image (Image Object)
@graphicagenda
graphicagenda / jQuery HTML5 placeholder fix.js
Last active November 29, 2019 22:39 — forked from hagenburger/jQuery HTML5 placeholder fix.js
[jQuery HTML5 placeholder fix.js] #LegacyGISTS #jQuery
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
@graphicagenda
graphicagenda / dabblet.css
Last active November 29, 2019 22:38 — forked from LeaVerou/dabblet.css
[drop-shadow filter vs box-shadow] #LegacyGISTS
/**
* drop-shadow filter vs box-shadow
*/
html {
background: url('http://subtlepatterns.com/patterns/purty_wood.png')
}
.speech-bubble {
position: relative;
@graphicagenda
graphicagenda / date-alt-format
Last active November 29, 2019 22:38
[Date from string] #LegacyGISTS #date
// https://github.com/rilwis/meta-box/issues/135
`date( 'another format', strtotime( $meta ) );`
@graphicagenda
graphicagenda / post-receive
Last active November 29, 2019 22:38 — forked from mythmon/post-receive
[The post-receive hook that allows to selectively run git hooks.] #LegacyGISTS
#!/bin/bash
# wrapper script for post-recieve
enabled_hooks="$(git config hooks.enabled)"
hooks_path="/usr/local/share/git/hooks/"
if [ -n "${enabled_hooks}" ] ; then
# change separate to comma
OLDIFS="$IFS"
IFS=","
@graphicagenda
graphicagenda / gist:2154264
Last active November 29, 2019 22:38
[Genesis Custom Body Class] #LegacyGISTS
add_filter( 'body_class', 'gk_add_body_class' );
function gk_add_body_class( $classes ) {
$classes[] = 'custom-class';
$classes[] = $_GET['bg'] == 1 ? 'bg1': '';
$classes[] = $_GET['bg'] == 2 ? 'bg2': '';
$classes[] = $_GET['bg'] == 3 ? 'bg3': '';
$classes[] = $_GET['bg'] == 4 ? 'bg4': '';
return $classes;
}