Skip to content

Instantly share code, notes, and snippets.

View CodeDecent's full-sized avatar
💭
Focused

CodeDecent

💭
Focused
View GitHub Profile
@karl0-dev
karl0-dev / gist:b887874d32b0d560014f
Created December 27, 2014 18:05
CSS media queries 2015
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* STYLES GO HERE */
}
/* Smartphones (landscape) ----------- */
@media only screen
@JacobBennett
JacobBennett / gist:edcda5625098fe3b6bab
Last active October 6, 2015 05:24
Setup Node and Gulp on a Digital Ocean Droplet for Elixir
sudo apt-get update
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs
npm install -g gulp
ALSO...
https://www.digitalocean.com/community/tutorials/how-to-get-started-with-gulp-js-on-your-vps
https://www.digitalocean.com/community/tutorials/how-to-install-an-upstream-version-of-node-js-on-ubuntu-12-04
@yoren
yoren / 404.html
Last active March 12, 2016 23:54
When Page Not Found In Your AngularJS WordPress Theme
<h1>Page Not Found</h1>
<p>Sorry, but nothing can be found at this location.</p>
@yoren
yoren / functions.php
Last active September 14, 2022 21:02
Add Featured Image Thumbnail URL to wp-json/wp/v2/posts Endpoint
<?php
function my_rest_prepare_post( $data, $post, $request ) {
$_data = $data->data;
$thumbnail_id = get_post_thumbnail_id( $post->ID );
$thumbnail = wp_get_attachment_image_src( $thumbnail_id );
$_data['featured_image_thumbnail_url'] = $thumbnail[0];
$data->data = $_data;
@maddisondesigns
maddisondesigns / functions.php
Last active August 5, 2025 09:32
WooCommerce Custom Fields for Simple & Variable Products
/*
* Add our Custom Fields to simple products
*/
function mytheme_woo_add_custom_fields() {
global $woocommerce, $post;
echo '<div class="options_group">';
// Text Field