A collection of links to the excellent"Composing Software" series of medium stories by Eric Elliott.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
- Docker is an open platform for developing, shipping, and running applications.
- Combines a lightweight container virtualization platform with workflows and tooling that help manage and deploy applications.
- Containerization allows for encapsulation of app specific configuration concerns.
- Encapsulation allows for decoupling of dependencies, so each app can depend on different versions.
- Simpler dependency management results in a low friction IT environment, less things to learn and break.
- Low friction allows to ship code faster, test faster, deploy faster, shortening the cycle between writing code and running code.
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
- Documentation: https://hub.docker.com/r/duluca/minimal-nginx-web-server/
docker pull duluca/minimal-node-web-server
(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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isBase64(str) { | |
try { | |
return btoa(atob(str)) == str; | |
} catch (err) { | |
return false; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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" |