Get a VPS that offers 2 or more IP addresses.
From the WHM cPanel, find the menu item Service Configuration
, select Apache Configuration
and then click on Reserved IPs Editor
.
.chart { | |
background: #b0e0f8; | |
margin: 5px; | |
} | |
.chart rect { | |
stroke: white; | |
fill: steelblue; | |
} |
<?php | |
class WPAS_Model_Order_Meta extends WPAS_Model { | |
static $primary_key = 'order_id'; | |
static function set_as_refunded( $order_id ) { | |
$data = array( 'is_refunded' => 1 ); | |
$where = array( 'order_id' => $order_id ); | |
self::update( $data, $where ); | |
} |
BUCKET="!!!!!!!!YOUR_AMAZON_S3_BUCKET_NAME_HERE!!!!!!!!!!" | |
CONTENT_TYPE="application/zip" | |
DATE=`date -R` | |
IN_FILE="revision.zip" | |
KEY="demo/revision.zip" | |
RESOURCE="/${BUCKET}/${KEY}" | |
HMAC="PUT\n\n${CONTENT_TYPE}\n${DATE}\n${RESOURCE}" | |
zip -r --exclude=*.git* "$IN_FILE" . |
This is a useful trick if you want to wrap two sibling elements in a containing element, for example to fix stupid float bugs in IE7. I had a bit of a time figuring out how to select the right elements (wrapping is easy enough with one element, or one element's children), so I thought I'd share for the Greater Good. | |
From markup like this: | |
<div class='form-container'> | |
... | |
<div class='form-label'>Name (required)</div> | |
<div class='form-field'><input type="text" name="you-name" value="" class="textbox" size="30" maxlength="200" /></div> | |
<div class='form-label'>Email (required)</div> |
This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
import cv2 | |
import time | |
import math | |
import numpy as np | |
capture = cv2.VideoCapture(0) | |
print capture.get(cv2.CAP_PROP_FPS) | |
t = 100 | |
w = 640.0 |
This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.
For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |