###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
<?php | |
/* | |
I wrote this function to progressively obfuscate text in MAKEbook.io. When it KINDA worked, I just used it. | |
It can take a lot of improvement. I kinda just tweaked the values until it was good enough. It's not SO progressive though. | |
It takes all the output of your PHP scripts via ob_start(), reroutes that to the obfuscation function. | |
You should check if user paid for book or not, then either run ob_start or not! | |
###Sketch trial non stop
Open hosts files:
$ open /private/etc/hosts
Edit the file adding:
127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
These examples are presented in an attempt to show how each coding styles attempts to or does not attempt to isolate side-effects. There are only 2 semantic elements in a barebone "Hello World" implementation:
console.log
HELLO_WORLD
Since every coding style can abstract away data into a parameter or variable, there is no point for us to show that. All implementations assume HELLO_WORLD
is a constant that is always inlined. This way it reduces the variations we need to present. (To make an anology, if we were to implement incrementByOne
, would we need to inline the number 1
or pass it in as parameter?)
CAVEAT/LIMITATION: All implementations also assume console
is static global. In case of functional programming, console.log
is asumed to be a function that can be passed around without further modification. (This is not the case in the browser, but that can be resolved with console.log.bind(console)
)
// All you want to do is take a table in the database | |
// and show it as a table in the browser. | |
// How hard could it be? | |
// First you gotta know SQL or whatever other language/syntax your | |
// database uses to query it | |
var query = "SELECT TOP 100 * FROM THINGS ORDER BY DATE" | |
// Then you gotta import and learn to use some database driver to talk to your database | |
// Or alternatively learn to use its REST api and work with whatever format it returns |
var gulp = require('gulp'); | |
var sourcemaps = require('gulp-sourcemaps'); | |
var source = require('vinyl-source-stream'); | |
var buffer = require('vinyl-buffer'); | |
var browserify = require('browserify'); | |
var watchify = require('watchify'); | |
var babel = require('babelify'); | |
function compile(watch) { | |
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel)); |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
Prereq:
apt-get install zsh
apt-get install git-core
Getting zsh to work in ubuntu is weird, since sh
does not understand the source
command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh