Skip to content

Instantly share code, notes, and snippets.

View danielmcclure's full-sized avatar

Daniel McClure danielmcclure

View GitHub Profile
@MrChrisJ
MrChrisJ / Installing_on_Jessie_Bitcoin_Core_0.12.md
Last active February 24, 2017 20:46
Installing_on_Jessie_Bitcoin_Core_0.12.md

Installing the Bitcoin #Fullnode to turn it in to a Freedom Machine

This is mashup of two instructions:

Raspnode & Tutorials & Technicalities - Compile Bitcoin Core on Raspberry Pi and forms part of the Bitcoin Fullnode Project.

You will need:

  1. 8Gb Micro SD Card (preferably Class 10 or above with wear protection)
  2. Download Raspian Jessie https://www.raspberrypi.org/downloads/raspbian / or your favourite distro

The new version of Raspbian Jessie is out: 2016-02-09-raspbian-jessie.img, at the time of writing includes bundled software which takes up extra room on the disk. To remove these packages see instructions on Strip Down Raspian.

contract WillManager {
address public willOwner;
bytes32 public hashOfWill;
function WillManager(){
willOwner = msg.sender;
}
function newWill(string will) {
if (msg.sender != willOwner) throw;
hashOfWill = sha3(will);
@ozh
ozh / cli-import-tweets-json.php
Created December 6, 2015 13:23
Tweets json importer for Ozh' Tweet Archive WordPress plugin
<?php
/**
* Import a JSON tweet list
*
* Import tweets from an archive as generated by Twitter
*
* Usage :
* - Import your tweets with the plugin. The plugin will import only the 3200 most recent tweets.
* - Download your archive from Twitter, open the tweets.csv file (delete first 3200 most recent tweets to speed up things)
* - put tweets.csv into the plugin directory
@quasel
quasel / gist:37c61aeb933bb8956745
Created November 7, 2015 09:21 — forked from BurlesonBrad/gist:de5b1ca4644d2b58a10f
Full Potential of Schema and WooCommerce
<div itemscope itemtype="http://schema.org/Product">
<span itemprop="name">Kenmore White 17" Microwave</span>
<img src="kenmore-microwave-17in.jpg" alt='Kenmore 17" Microwave' />
<div itemprop="aggregateRating"
itemscope itemtype="http://schema.org/AggregateRating">
Rated <span itemprop="ratingValue">3.5</span>/5
based on <span itemprop="reviewCount">11</span> customer reviews
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<!--price is 1000, a number, with locale-specific thousands separator
@jennimckinnon
jennimckinnon / .htaccess
Last active April 8, 2018 19:27
Denying access to the the WordPress login and admin pages to certain IP addresses with added error pages in case of a redirect loop.
ErrorDocument 401 /path-to-your-site/index.php?error=404
ErrorDocument 403 /path-to-your-site/index.php?error=404
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} ^(.*)?wp-login\.php(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^(.*)?wp-admin$
RewriteCond %{REMOTE_ADDR} !^IP Address One$
RewriteCond %{REMOTE_ADDR} !^IP Address Two$
RewriteCond %{REMOTE_ADDR} !^IP Address Three$
@ultimatemember
ultimatemember / gist:f7eab149cb33df735b08
Last active May 30, 2024 18:03
Extend Ultimate Member Account page with custom tabs/content
/* add new tab called "mytab" */
add_filter('um_account_page_default_tabs_hook', 'my_custom_tab_in_um', 100 );
function my_custom_tab_in_um( $tabs ) {
$tabs[800]['mytab']['icon'] = 'um-faicon-pencil';
$tabs[800]['mytab']['title'] = 'My Custom Tab';
$tabs[800]['mytab']['custom'] = true;
return $tabs;
}
@mikejolley
mikejolley / gist:f072ed42f3ec33385e38
Last active August 25, 2019 23:06
Using reCAPTCHA with WP Job Manager
<?php
// Define your keys here
define( 'RECAPTCHA_SITE_KEY', 'XXX' );
define( 'RECAPTCHA_SECRET_KEY', 'XXX' );
// Enqueue Google reCAPTCHA scripts
add_action( 'wp_enqueue_scripts', 'recaptcha_scripts' );
function recaptcha_scripts() {
wp_enqueue_script( 'recaptcha', 'https://www.google.com/recaptcha/api.js' );
@tommyshellberg
tommyshellberg / functions.php
Created August 8, 2014 07:55
Change the Woocommerce Bookings display price to an amount per person
//Place in your theme's functions.php file
function custom_booking_price( $price, $product ) {
$target_product_types = array(
'booking'
);
if ( in_array ( $product->product_type, $target_product_types ) ) {
// if variable product change price output
$price = '';
$price .= woocommerce_price($product->get_price()) . ' per person';
@corsonr
corsonr / gist:c2781c9e0cc086c5047f
Created July 17, 2014 08:51
WooCommerce: Add customer username to edit/view order admin page
<?php
// Add WooCommerce customer username to edit/view order admin page
add_action( 'woocommerce_admin_order_data_after_billing_address', 'woo_display_order_username', 10, 1 );
function woo_display_order_username( $order ){
global $post;
$customer_user = get_post_meta( $post->ID, '_customer_user', true );
echo '<p><strong style="display: block;">'.__('Customer Username').':</strong> <a href="user-edit.php?user_id=' . $customer_user . '">' . get_user_meta( $customer_user, 'nickname', true ) . '</a></p>';
@AlphaBlossom
AlphaBlossom / remove-woocommerce-admin-theme-support-warning.php
Last active February 7, 2022 15:35
Integrate WooCommerce into Genesis Child Theme
// Remove WooCommerce Theme Support admin message
add_theme_support( 'woocommerce' );