Skip to content

Instantly share code, notes, and snippets.

View s3w47m88's full-sized avatar

Spencer Hill s3w47m88

View GitHub Profile
@schalkburger
schalkburger / sage_favicons.php
Last active January 16, 2020 01:33
Roots Sage Favicons
/**
* Load favicons
* Place icons in the theme images directory. Want more? http://realfavicongenerator.net/
*/
function sage_favicons() {
echo '<link rel="apple-touch-icon" sizes="57x57" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-57x57.png">';echo "\n";
echo '<link rel="apple-touch-icon" sizes="60x60" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-60x60.png">';echo "\n";
echo '<link rel="apple-touch-icon" sizes="72x72" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-72x72.png">';echo "\n";
echo '<link rel="apple-touch-icon" sizes="76x76" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-76x76.png">';echo "\n";
echo '<link rel="apple-touch-icon" sizes="114x114" href="'. get_template_directory_uri() .'/dist/images/apple-touch-icon-114x114.png">';echo "\n";
@mammuth
mammuth / backlinks.php
Last active December 19, 2023 18:41
Get Backlinks to URL in PHP via Google [Warning: deprecated]
@konradsroka
konradsroka / ks-custom-login.js
Created January 20, 2015 08:30
Add Placeholders To WordPress Login Form And Remove Labels
// ----------------------------------------------------
// Adding the placeholders in textfields of login form
// ----------------------------------------------------
jQuery(document).ready(function($) {
$('#loginform input[type="text"]').attr('placeholder', 'Username');
$('#loginform input[type="password"]').attr('placeholder', 'Password');

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);
@jarretgabel
jarretgabel / mobile-redirection-htaccess
Created February 18, 2014 20:36
htaccess mobile redirect
RewriteEngine On
RewriteCond %{QUERY_STRING} !^desktop
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot-mobile|iemobile|iphone|ipod|#opera mobile|palmos|webos" [NC]
RewriteCond %{HTTP_USER_AGENT} "acs|alav|alca|amoi|audi|aste|avan|benq|bird|blac|blaz|brew|cell|cldc|cmd-" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "dang|doco|eric|hipt|inno|ipaq|java|jigs|kddi|keji|leno|lg-c|lg-d|lg-g|lge-" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "maui|maxo|midp|mits|mmef|mobi|mot-|moto|mwbp|nec-|newt|noki|opwv" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "palm|pana|pant|pdxg|phil|play|pluc|port|prox|qtek|qwap|sage|sams|sany" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "sch-|sec-|send|seri|sgh-|shar|sie-|siem|smal|smar|sony|sph-|symb|t-mo" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "teli|tim-|tosh|tsm-|upg1|upsi|vk-v|voda|w3cs|wap-|wapa|wapi" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} "wapp|wapr|webc|winw|winw|xda|xda-" [NC,OR]
@resba
resba / completeinstall--centos5--cb818.sh
Created April 25, 2011 21:40
Install/Upgrade Minecraft Server Running CraftBukkit
#!/bin/bash
cburl="http://ci.bukkit.org/job/dev-CraftBukkit/Recommended/artifact/target/craftbukkit-0.0.1-SNAPSHOT.jar"
cbver="818"
# Script by resba
#
# Complete Install:
# Complete Install installs the Craftbukkit Server along with any and all peripherals such as java and screen needed to run the Server on Linux CentOS Machines. Comes with step-by-step server.properties installer.
#