(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.
## Automate FTP uploads | |
## Go to destination | |
cd C:\Test | |
$location = Get-Location | |
"We are here: $location" | |
## Get files | |
$files = Get-ChildItem -recurse | |
## Get ftp object | |
$ftp_client = New-Object System.Net.WebClient | |
$ftp_address = "ftp://user:pass@adress:/home/chardcastle/test" |
function isBase64(str) { | |
try { | |
return btoa(atob(str)) == str; | |
} catch (err) { | |
return false; | |
} | |
} |
(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.
These are generic npm scripts that you can copy & paste into your package.json
file as-is and get access to convinience scripts to manage your Docker images all in one place.
Looking for npm scripts for AWS ECS? Go here!
Watch the video: Do More With Less JavaScript
docker pull duluca/minimal-nginx-web-server
docker pull duluca/minimal-node-web-server
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8080; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), "public", uri); |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_regular_price' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_sale_price' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2)WHERE meta_key = '_price' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_regular_price_tmp' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_sale_price_tmp' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_price_tmp' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_min_variation_price' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_max_variation_price' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_min_va |
private bool CompareStreams(Stream a, Stream b) | |
{ | |
if (a == null && | |
b == null) | |
return true; | |
if (a == null || | |
b == null) | |
{ | |
throw new ArgumentNullException( | |
a == null ? "a" : "b"); |
A collection of links to the excellent"Composing Software" series of medium stories by Eric Elliott.