Skip to content

Instantly share code, notes, and snippets.

View yooouuri's full-sized avatar

Youri van Mill yooouuri

View GitHub Profile
@yooouuri
yooouuri / routes.php
Created February 21, 2017 13:58
Routes
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt
cd /opt/letsencrypt
sudo -H ./letsencrypt-auto certonly --standalone --renew-by-default -d example.com -d www.example.com
# cronjob, maandelijks
echo '@monthly root /opt/letsencrypt/letsencrypt-auto certonly --quiet --standalone --renew-by-default -d example.com -d www.example.com >> /var/log/letsencrypt/letsencrypt-auto-update.log' | sudo tee --append /etc/crontab
# /etc/nginx/sites-enabled/yourivanmill.nl
cd /opt/letsencrypt
# command uitvoeren
sudo -H ./letsencrypt-auto certonly --standalone --renew-by-default -d example.com -d www.example.com
# voorbeeld nginx conf
# jouw config is: /etc/nginx/sites-available/maartenpeels.com
# voeg onderstaande toe aan je server { ... } block
listen 443 ssl;
listen [::]:443 ssl;
<?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
<?php
namespace App\Http\Middleware;
use App\User;
use Closure;
use Illuminate\Support\Facades\Auth;
class CheckAdmin
{
<?php
namespace App\Http\Controllers\Admin;
use App\User;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
<?php
namespace App\Http\Controllers\admin;
use App\User;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
class UserController extends Controller
package edu.fontys.stayconnected.ui.activities;
import android.content.DialogInterface;
import android.content.Intent;
import android.provider.Settings;
import android.support.v4.app.NotificationManagerCompat;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
/**
* @param $id
* @param int $page
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function category($id, $page = 1)
{
$maxItems = 9;
$skip = ($page - 1) * $maxItems;
<?php
namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.