This file contains hidden or 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
.genesis-nav-menu .widget { | |
float: right; | |
} | |
.genesis-nav-menu .simple-social-icons ul li { | |
margin-bottom: 0 !important; | |
margin-top: 0.7rem !important; | |
} |
This file contains hidden or 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
// *** Extends the following class: src/wp-includes/class-wp-widget.php | |
class My_Widget extends WP_Widget { | |
/** | |
* Sets up the widgets name etc | |
*/ | |
public function __construct() { | |
$widget_ops = array( | |
'classname' => 'my_widget', |
This file contains hidden or 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
# "The Optimized Badass" | |
# Sonic Pi v2.11 | |
# ---------------------------------------- | |
# Samples used in this song can be downloaded from: | |
# https://dl.dropboxusercontent.com/u/657073/sonicpi/badass-samples.zip | |
# Unpack and put them into your samples folder. | |
# ---------------------------------------- | |
# This file is too long to be played from the Sonic Pi IDE | |
# Instead of pasting this code, just enter the following into the Sonic Pi editor: | |
# run_file "/path/to/this_file.rb" |
This file contains hidden or 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
# Sonic Pi 2.11 | |
set_volume! 1 | |
##| Link to the samples folder: | |
samples_dir = "/Users/srdjan/Dropbox Srdjan/Dropbox/Projects/Sonic_Pi/song_by_sea/samples/" | |
##| There is 99.9999% chance that your link is different. Change it to point to your dir... | |
use_synth_defaults pulse_width: 0.99, coef: 0.45 | |
# -------------------- CONTROL -------------------- |
This file contains hidden or 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
//* Remove the entry meta in the entry header (requires HTML5 theme support) | |
remove_action( 'genesis_entry_header', 'genesis_post_info', 12 ); |
This file contains hidden or 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
// Animated GIF | |
convert -delay 120 -loop 0 *.png animated.gif | |
// Get duration for animated gif frames | |
identify -format "Frame %s: %Tcs\n" animated.gif |
This file contains hidden or 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
// Change canvas size (resize canvas to 48x48 pixels) | |
convert input.png -gravity center -background transparent -extent 48x48 output.png | |
// Resize | |
convert img1.png -resize 400x300 img2.png | |
// Resize by height only: | |
convert img1.png -resize x300 img2.png | |
// width_x_height_+_leftoffset_+_topoffset_ |
This file contains hidden or 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
function toPixels(pNum) { | |
'use strict'; | |
return pNum + 'px'; | |
} |
This file contains hidden or 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
function hasClass(el, className) { | |
'use strict'; | |
if (el.classList) { | |
return el.classList.contains(className); | |
} | |
return !!el.className.match(new RegExp('(\\s|^)' + className + '(\\s|$)')); | |
} | |
function addClass(el, className) { | |
'use strict'; |