(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.
<?php | |
/* | |
For a better understanding of ics requirements and time formats | |
please check https://gist.github.com/jakebellacera/635416 | |
*/ | |
// UTILS | |
// Check if string is a timestamp |
#!/usr/bin/php | |
<?php | |
$files = shell_exec('git diff-index --name-only --cached --diff-filter=ACMR HEAD | grep "\.php$"'); | |
$files = explode("\n", trim($files)); | |
$exitCode = 0; | |
foreach ($files as $file) { | |
if (empty($file)) { |
import requests | |
import json | |
import calendar | |
from datetime import datetime, timedelta | |
#token from https://api.slack.com/web | |
_token = "YOUR TOKEN HERE" | |
_domain = "YOUR SUB DOMAIN HERE" | |
if __name__ == '__main__': |
<?php namespace App\Http\Controllers; | |
use \Illuminate\Support\Facades\DB; | |
use \Illuminate\Support\Str; | |
use League\Flysystem\Exception; | |
/** | |
* Class SAMODbmigrateController | |
* | |
* Converts an existing MySQL database to migrations files for Laravel 5. |
<?php namespace App\Http\Controllers; | |
/* * ** | |
* | |
* MySQL database script for full schema migrations in Laravel 5. | |
* | |
* 1. Place this file inside app/Http/controllers/ | |
* | |
* 2. In this file, edit the index() method to customize this script to your needs. | |
* - inside $migrate->ignore(), you pass in an array of table |
//Notes in loop | |
392.00 => float G4; | |
440 => float A4; | |
466.16 => float Asharp4; | |
523.25 => float C5; | |
587.33 => float D5; | |
659.25 => float E5; | |
698.46 => float F5; |
(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.
#!/bin/sh | |
LOGFILE=./post-receive.log | |
DEPLOYDIR=$DEPLOYDIR # The place to deploy to. | |
echo -e "[log] Received push request at $( date +%F)" >> $LOGFILE | |
echo "[log] - Old SHA: $oldrev New SHA: $newrev Branch Name: $refname" >> $LOGFILE | |
echo "[log] Starting Deploy..." >> $LOGFILE |
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');
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <barryvdh@gmail.com> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |