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
jQuery( function( $ ) { | |
var update_row_colours = function() { | |
// Change [data-name="schedule"] to the corresponding acf group | |
jQuery('[data-name="schedule"] .acf-table .acf-row').each( function() { | |
var from = $( this ).find('[data-name="from"] input'); | |
var to = $( this ).find('[data-name="to"] input'); | |
var from_date = new Date( from.val() ); | |
var to_date = new Date( to.val() ); | |
var now = ( new Date() ).getTime(); |
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
/* Allow objects to extend past their boundries */ | |
.overhang{ | |
margin-left: calc(-50vw + 50%); | |
margin-right: calc(-50vw + 50%); | |
@at-root body{ | |
overflow-x: hidden; | |
} | |
} |
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
x = transform.position[0]; // x.axis | |
y = transform.position[1]; // y.axis | |
w = wiggle( 3, 200 ); // Move ~200px 3 times per second | |
[w[0], y]; // Apply to X |
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
n = 5; // play every 5th frame | |
m = 2; // play each frame twice | |
f = timeToFrames(); | |
p = Math.floor( f / m ); | |
framesToTime( p * n ) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<?php | |
/* Shop URL = Get the WooCommerce Shop URL (this is the root category page) with the following */ | |
$shop_page_url = get_permalink( woocommerce_get_page_id( 'shop' ) ); | |
/* My Account URL - You can get the WooCommerce My Account URL by using the woocommerce_myaccount_page_id option: */ | |
$myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' ); | |
if ( $myaccount_page_id ) { | |
$myaccount_page_url = get_permalink( $myaccount_page_id ); |
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
# Go to your uploads folder | |
cd /wp-content/uploads | |
# Remove all images that wordpress created | |
find -E . -type f -iregex '.*[0-9]{2,3}x[0-9]{2,3}.*\.(jpg|jpeg|png|eps|gif)' -exec rm {} \; | |
# ZIP all original images incase things go wrong on this next bit | |
find . -type f | egrep -vi '.*[0-9]{2,3}x[0-9]{2,3}.*\.(jpg|jpeg|png|eps|gif)' | zip images.zip -@ | |
# Convert what is left from png to jpg with white in place of transparency |
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
# Google analytics on the C.H.I.P | |
# Importing GPIO pins | |
import urllib2 | |
import CHIP_IO.GPIO as io | |
pir_pin = "CSID0" | |
io.setup(pir_pin, io.IN) | |
def hitGA(): |
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
wget https://dl.dropbox.com/u/8850924/fixpackage | |
chmod +x ./fixpackage | |
sudo ./fixpackage |
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
jQuery( function( $ ) { | |
// No images? No problem. | |
// Replace source of missing images | |
$('img').error( function(){ | |
// Show a nice white image @ 1440x1000 that is only 1kb | |
$(this).attr( 'src', 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABaAAAAPoAQMAAAAStcuwAAAABlBMVEXu7u7h4eEQJSZcAAAFk0lEQVR4AezBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgNmzbxg7diuM4x9xoKUj6RzHM32nksVgb185u76lSzpPsd7LC6Xupf6959p94U5HcOnQFw7HuRPoPIKvhiZnNq9zpID5KxBi9cPBEa9W+1fSuJVBqXmx0B1Kxy8W2qLU4z/buh4BL14a/6tW9B18A28DPoF85uMOgPflSyyXVab3b377gA3TtNUH4GNTJwYpdNLofHmQOtGUfjUhiU5iJ6BLu2hU4l1s9E70VCv6WerUr6N9OXYd0L35LKN/IcPY6HJZK1pOtWLfkvQ6oCMZDAWOdxs9X1a60wUbXKPEUUBmOptPQaPD0KhaJ809BbgeMsxoduYc7Vy9aFfQDtErRqO4N8SIGV0ua0bfGbPP04x2RkWc1I3el/XYFPQuzejGqoQN1z3p4CikC3TZaey4iwU91IpW7Gj/uzLUL7+GZadhhcbqd/oel9fDA8tOAxF99Tt9r7zT8QzdWMCjKehe1bvTBd0qGQqaynqcoxuqeT3CYEkchXnShuC3M7rTNU+aR53kWIdlp4ljnHfapop3ev/HkSbp0vJ6WJVkNxa0nipej336Fg5iJyzvtEq8iQWtxjrRpMKHFE7fBYga |