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
function sleep (time) { | |
return new Promise((resolve) => setTimeout(resolve, time)); | |
} | |
sleep(500).then(() => { | |
// Do something after the sleep! | |
}) |
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
a[href^="http"]:empty::before { | |
content: attr(href); | |
} |
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
G28 Z ; Home Z - LW | |
G0 Z50 ; Move Z to 50 - LW |
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
camera_raspi_options="-x 1440 -y 1080 -fps 15 -quality 95 -sh 25 -br 60 -co 40 -sa 10 -awb fluorescent" |
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
#!/bin/bash | |
# Use CRON to regularly update for DIY DynDNS | |
PUBLIC_IPV4=$(curl ifconfig.co) | |
API_ACCESS_TOKEN=<your_access_token> | |
RECORD_ID=<your_record_id> | |
curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer ${API_ACCESS_TOKEN}" -d '{"data":"'"${PUBLIC_IPV4}"'"}' "https://api.digitalocean.com/v2/domains/centralindustrial.co.uk/records/${RECORD_ID}" |
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 | |
add_action( 'added_post_meta', 'mp_sync_on_product_save', 10, 4 ); | |
add_action( 'updated_post_meta', 'mp_sync_on_product_save', 10, 4 ); | |
function mp_sync_on_product_save( $meta_id, $post_id, $meta_key, $meta_value ) { | |
if ( $meta_key == '_edit_lock' ) { // we've been editing the post | |
if ( get_post_type( $post_id ) == 'product' ) { // we've been editing a product | |
$product = wc_get_product( $post_id ); | |
// do something with this product | |
} | |
} |
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
// Enable "experimental.retroTerminalEffect" and crank up the "fontSize" | |
// For that true WarGames look set "cursorShape" to "filledBox" and install this typeface: | |
// https://fontstruct.com/fontstructions/show/789830/wargames_2 | |
{ | |
"name" : "LW Amber CRT", | |
"foreground" : "#FFB000", | |
"background" : "#282828", | |
"cursorColor" : "#FFB000", | |
"black" : "#FFB000", |
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
<form id="my-form"> | |
<label for="name">Name:</label> | |
<input type="text" name="name"></input> | |
</form> | |
<button type="submit" form="my-form">Submit</button> |
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
http://source.unsplash.com/random/1200x600 |
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
display: grid; | |
place-items: center; |
NewerOlder