MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to: Sublime Text
Make it executable with: chmod u+x Sublime\ Text
<?php add_action('init', 'my_replace_image_urls' ); | |
function my_replace_image_urls() { | |
if ( defined('WP_SITEURL') && defined('LIVE_SITEURL') ) { | |
if ( WP_SITEURL != LIVE_SITEURL ){ | |
add_filter('wp_get_attachment_url', 'my_wp_get_attachment_url', 10, 2 ); | |
} | |
} | |
} | |
function my_wp_get_attachment_url( $url, $post_id) { |
#Simple Authentication with Bcrypt
This tutorial is for adding authentication to a vanilla Ruby on Rails app using Bcrypt and has_secure_password.
The steps below are based on Ryan Bates's approach from Railscast #250 Authentication from Scratch (revised).
You can see the final source code here: repo. I began with a stock rails app using rails new gif_vault
##Steps
<?php | |
// Begin FES integration | |
// add button to the post button listing | |
function fes_shipping_field_button( $title ) { | |
if ( version_compare( fes_plugin_version, '2.2', '>=' ) ) { | |
echo '<button class="fes-button button" data-name="edd_simple_shipping" data-type="action" title="' . $title . '">'. __( 'Shipping', 'edd-simple-shipping' ) . '</button>'; | |
} | |
} | |
add_action('fes_custom_post_button', 'fes_shipping_field_button'); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
#!/bin/bash | |
# Bash script to install latest version of ffmpeg and its dependencies on Ubuntu 12.04 or 14.04 | |
# Inspired from https://gist.github.com/faleev/3435377 | |
# Remove any existing packages: | |
sudo apt-get -y remove ffmpeg x264 libav-tools libvpx-dev libx264-dev | |
# Get the dependencies (Ubuntu Server or headless users): | |
sudo apt-get update |
function transfer | |
if test (count $argv) -eq 0 | |
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md" | |
return 1 | |
end | |
## get temporarily filename, output is written to this file show progress can be showed | |
set tmpfile ( mktemp -t transferXXX ) | |
## upload stdin or file |
# Procedure is for Ubuntu 14.04 LTS. | |
# Using these guides: | |
# http://datacenteroverlords.com/2012/03/01/creating-your-own-ssl-certificate-authority/ | |
# https://turboflash.wordpress.com/2009/06/23/curl-adding-installing-trusting-new-self-signed-certificate/ | |
# https://jamielinux.com/articles/2013/08/act-as-your-own-certificate-authority/ | |
# Generate the root (GIVE IT A PASSWORD IF YOU'RE NOT AUTOMATING SIGNING!): | |
openssl genrsa -aes256 -out ca.key 2048 | |
openssl req -new -x509 -days 7300 -key ca.key -sha256 -extensions v3_ca -out ca.crt |
npm install -g npm
to update npm to the latest versionNow you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.