(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.
(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.
| #!/usr/bin/env perl | |
| #============================================================================= | |
| # | |
| # FILE: dmarc-report-display.pl | |
| # | |
| # USAGE: ./dmarc-report-display.pl REPORT | |
| # | |
| # DESCRIPTION: Parse and display a DMARC report | |
| # | |
| # REQUIREMENTS: Perl 5.10; File::LibMagic, Term::ANSIColor; XML::LibXML |
| [Unit] | |
| Description=Keeps a tunnel to 'remote.example.com' open | |
| After=network.target | |
| [Service] | |
| User=autossh | |
| # -p [PORT] | |
| # -l [user] | |
| # -M 0 --> no monitoring | |
| # -N Just open the connection and do nothing (not interactive) |
| #!/bin/bash | |
| # | |
| # This script configures WordPress file permissions based on recommendations | |
| # from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
| # | |
| # Author: Michael Conigliaro | |
| # | |
| WP_OWNER=changeme # <-- wordpress owner | |
| WP_GROUP=changeme # <-- wordpress group | |
| WP_ROOT=/home/changeme # <-- wordpress root directory |
For the scenario, imagine posts has a foreign key user_id referencing users.id
public function up()
{
Schema::create('posts', function(Blueprint $table) {
$table->increments('id');
$table->string('title');
$table->text('body');| # | |
| # CORS header support | |
| # | |
| # One way to use this is by placing it into a file called "cors_support" | |
| # under your Nginx configuration directory and placing the following | |
| # statement inside your **location** block(s): | |
| # | |
| # include cors_support; | |
| # | |
| # As of Nginx 1.7.5, add_header supports an "always" parameter which |
Configure local wildcard DNS server
sudo apt-get install dnsmasq/etc/NetworkManager/NetworkManager.conf and comment out (#) the line that reads dns=dnsmasq. Restart NetworkManager afterwards: sudo restart network-manager./etc/dnsmasq.conf, and adding the line listen-address=127.0.0.1./etc/dnsmasq.d (eg. /etc/dnsmasq.d/dev), and add the line address=/dev/127.0.0.1 to have dnsmasq resolve requests for *.dev domains. Restart Dnsmasq: sudo /etc/init.d/dnsmasq restart.source: http://brunodbo.be/blog/2013/04/setting-up-wildcard-apache-virtual-host-wildcard-dns
| // | |
| // Serials communications (TX only) with ATtiny84 | |
| // | |
| // electronut.in | |
| // | |
| #include <avr/io.h> | |
| #include <string.h> | |
| #include <util/delay.h> | |
| #include <avr/interrupt.h> |
| # Name: Makefile | |
| # | |
| # A simple program for the ATtiny84 that blinks an LED. | |
| # | |
| # electronut.in | |
| DEVICE = attiny84 | |
| CLOCK = 8000000 | |
| PROGRAMMER = -c usbtiny | |
| OBJECTS = main.o |
| // | |
| // A simple program for the ATtiny84 that blinks an LED. | |
| // | |
| // electronut.in | |
| // | |
| #include <avr/io.h> | |
| #include <util/delay.h> | |
| #define F_CPU 8000000 |