##1. Setup docker
#Mac
https://docs.docker.com/installation/mac/
#Linux
https://docs.docker.com/installation/ubuntulinux/
##2. Setup docker-machine
// Udi style w Static Domain Events | |
var dispatcher = new RecordingDomainEventsDispatcher(); | |
DomainEvents.Dispatcher = dispatcher; | |
var customer = new Customer(new Address()); | |
customer.Move(new Address()); | |
Console.WriteLine("Customer moved: " + dispatcher.RecordedDomainEvent(new CustomerMoved())); |
import Data.List (groupBy, sortBy) | |
getQuantity xs = let countQuantity acc (_, "registered") = succ acc | |
countQuantity acc (_, "sold") = pred acc | |
compareASC (i1, _) (i2, _) | |
| i1 < i2 = LT | |
| i1 > i2 = GT | |
| i1 == i2 = EQ | |
in map (foldl (countQuantity) 0) $ groupBy (\x y -> (fst x) == (fst y)) $ sortBy (compareASC) xs | |
##1. Setup docker
#Mac
https://docs.docker.com/installation/mac/
#Linux
https://docs.docker.com/installation/ubuntulinux/
##2. Setup docker-machine
<?php | |
/* | |
OCP - Optimizer+ Control Panel, by _ck_, stasilok | |
Version 0.0.6 | |
Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
* revision history | |
0.0.6 2013-03-16 added opcache support (autodetect opcache or ZendOptimizerPlus functionality) (because of "ZendOptimizerPlus" is renamed to "opcache" to be merged into PHP-5.5) (stasilok) | |
0.0.5 2013-03-10 added refresh button (GK) | |
0.0.4 2013-02-18 added file grouping and sorting (click on headers) - code needs cleanup but gets the job done |
PYTHONPATH=/opt/graphite/webapp/graphite | |
MODULE=graphite_uwsgi |
#!/usr/bin/env bash | |
# finds all sprint tags (like @sprint:42) and runs them in a reversed order (won't run not tagged scenarios) | |
PARALLEL_COMMAND='parallel --gnu' | |
#PARALLEL_COMMAND='xargs -I{}' | |
BEHAT_COMMAND='./bin/behat --ansi --tags={}' | |
grep '@sprint:' features/*.feature | sed -e 's/.*\(@sprint:[0-9]*\).*/\1/' | sort -ur | $PARALLEL_COMMAND $BEHAT_COMMAND |
I think the best way to answer this definitively without just handwaving | |
and talking about the C preprocessor is to actually write two small | |
example programs and compare the generated code from both. When I was | |
first learning C I did this constantly trying to understand how the | |
compiler worked. You don't need to understand assembly in great detail | |
to be able to spot differences in the output: | |
$ cat a.c | |
int main() { | |
char *line = "HTTP/1.0 500 Internal Server Error"; |
<?php | |
$cnn = new AMQPConnection(); | |
$cnn->setLogin("guest"); | |
$cnn->setPassword("guest"); | |
$cnn->setHost("localhost"); | |
if ($cnn->connect()) { | |
echo "Established a connection to the broker\n"; | |
} |
# Scan for CVE-2017-0143 MS17-010 | |
# The vulnerability used by WannaCry Ransomware | |
# | |
# 1. Use @calderpwn's script | |
# http://seclists.org/nmap-dev/2017/q2/79 | |
# | |
# 2. Save it to Nmap NSE script directory | |
# Linux - /usr/share/nmap/scripts/ or /usr/local/share/nmap/scripts/ | |
# OSX - /opt/local/share/nmap/scripts/ | |
# |
Open PostgreSQL and Create a table student
in database student
.
CREATE EXTENSION hstore;
CREATE TABLE student (
id int,
name varchar(254) NOT NULL,
hobbies text[],
marks hstore
);