This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://coderwall.com/p/euwpig/a-better-git-log | |
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Converts an array of single rows with a parent id column into a tree | |
function tree($rows){ | |
// supplied array must be indexed by row id | |
$tree = array(); //stores the tree | |
$tree_index = array(); //an array used to quickly find nodes in the tree | |
$id_column = "id"; //The column that contains the id of each node | |
$parent_column = "parent"; //The column that contains the id of each node's parent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Breakpoint mixins | |
*/ | |
$breakpoints: ( | |
mobile: ( min: 300px, max: 479px ), | |
mobile_ls: ( min: 480px, max: 759px ), | |
tablet: ( min: 760px, max: 1023px ), | |
tablet_ls: ( min: 1024px, max: 1279px ), | |
laptop: ( min: 1280px, max: 1499px ), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Shorten a string to a specific word count | |
function wordTrim($str,$maxwords=25, $more = '...'){ | |
$words = explode(' ',trim($str)); | |
if(count($words) > $maxwords) | |
{ | |
$newStr = array(); | |
for($i=0;$i<$maxwords;$i++) | |
$newStr[] = $words[$i]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.youtube.com/embed/VIDEOID?rel=0&controls=0&modestbranding=1&showinfo=0&hd=1&autoplay=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Generated from http://www.iso.org/iso/country_codes.htm on 2013/01/22 --> | |
<select name="country"> | |
<option value="AF">AFGHANISTAN</option> | |
<option value="AX">ÅLAND ISLANDS</option> | |
<option value="AL">ALBANIA</option> | |
<option value="DZ">ALGERIA</option> | |
<option value="AS">AMERICAN SAMOA</option> | |
<option value="AD">ANDORRA</option> | |
<option value="AO">ANGOLA</option> | |
<option value="AI">ANGUILLA</option> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Prevent TinyMCE from stripping out schema.org metadata | |
function schema_TinyMCE_init($in) | |
{ | |
/** | |
* Edit extended_valid_elements as needed. For syntax, see | |
* http://www.tinymce.com/wiki.php/Configuration:valid_elements | |
* | |
* NOTE: Adding an element to extended_valid_elements will cause TinyMCE to ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Fluid App Userscript | |
FastMail beta web interface | |
URL pattern: *fastmail.fm/mail/* | |
Based on https://github.com/melomac/Fluid | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Options +FollowSymlinks -Indexes | |
RewriteEngine On | |
# Disable the Server Signature | |
ServerSignature Off | |
# BEGIN WordPress | |
# Except for requests for /index.php and for the most-frequently-requested | |
# filetypes that WP cannot generate, rewrite all URL requests which do not | |
# resolve to an existing file or directory to the WordPress script filepath |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* fix iOS bug not displaying 100vh correctly */ | |
/* iPad Pro */ | |
@media only screen and (min-device-width : 1024px) and (max-device-width : 1366px) and (orientation : landscape) { | |
.fullheight { | |
height: 1024px; | |
} | |
} | |
@media only screen and (min-device-width : 1024px) and (max-device-width : 1366px) and (orientation : portrait) { | |
.fullheight { |
OlderNewer