Freezer cgroup FTW
In a terminal start a server.
$ python -m SimpleHTTPServer 8000
In another terminal set up the cgroups freezer.
add_filter( 'woocommerce_cart_no_shipping_available_html', 'myplugin_no_shipping_available_message' ); | |
add_filter( 'woocommerce_no_shipping_available_html', 'myplugin_no_shipping_available_message' ); | |
/** | |
* Update the Woocommerce No Shipping message to include contact details. | |
*/ | |
function myplugin_no_shipping_available_message( $message ) { | |
$country = WC()->customer->get_shipping_country(); | |
$mailto = 'mailto:' . get_option( 'admin_email' ); // Could also be 'woocommerce_stock_email_recipient'. | |
$link = sprintf( wp_kses( __( '<a href="%s">contact us</a>', 'my-plugin' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( $mailto ) ); |
#!/bin/bash | |
# program-specific xbindkeys bindings | |
# there's a tool called `autokey`, which does this, but unlike xbindkeys, it doesn't catch mouse buttons | |
# doesn't interfere with main xbindkeys | |
# `pacman -S xbindkeys xdotool` | |
# `sleep 3 && cat /proc/$(xdotool getwindowpid $(xdotool getwindowfocus))/comm` |
javascript:{window.location='https://ohdear.app/tools/reachable?prefill='+encodeURIComponent(window.location.href)} |
{ | |
"src": "/tmp/scratch-desktop/", | |
"dest": "/tmp/", | |
"arch": "i386", | |
"icon": "/tmp/scratch-desktop/resources/Icon.png", | |
"categories": [ | |
"Education" | |
] | |
} |
In a terminal start a server.
$ python -m SimpleHTTPServer 8000
In another terminal set up the cgroups freezer.
# Description: Boxstarter Script | |
# Author: Jess Frazelle <jess@linux.com> | |
# Last Updated: 2017-09-11 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
node { | |
try{ | |
notifyBuild('STARTED') | |
bitbucketStatusNotify(buildState: 'INPROGRESS') | |
ws("${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}/") { | |
withEnv(["GOPATH=${JENKINS_HOME}/jobs/${JOB_NAME}/builds/${BUILD_ID}"]) { | |
env.PATH="${GOPATH}/bin:$PATH" | |
stage('Checkout'){ |
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
#!/bin/sh -e | |
# | |
# This file belongs in /usr/lib/dhcpcd5/dhcpcd how you get it there is up to you | |
# | |
DHCPCD=/sbin/dhcpcd | |
INTERFACES=/etc/network/interfaces | |
REGEX="^[[:space:]]*iface[[:space:]](*.*)[[:space:]]*inet[[:space:]]*(dhcp|static)" | |
EXCLUDES="" |
function upload(file) { | |
var imageLink =""; | |
/* Is the file an image? */ | |
if (!file || !file.type.match(/image.*/)) return; | |
var fd = new FormData(); | |
fd.append("image", file); // Append the file | |
fd.append("key", "<Imgur API key>"); |