Skip to content

Instantly share code, notes, and snippets.

View notflip's full-sized avatar
🎯
Focusing

Miguel Stevens notflip

🎯
Focusing
  • Studio Monty
  • Ghent, Belgium
View GitHub Profile
@notflip
notflip / run.sh
Last active October 10, 2017 10:03
AWS EC2 LEMP Setup
cat ~/.ssh/id_rsa.pub | ssh -i "#DOMAIN#.pem" ubuntu@ec2-#DOMAIN-IP#.eu-central-1.compute.amazonaws.com "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
# SSH into the instance
ssh -i "#DOMAIN#.pem" ubuntu@ec2-#DOMAIN-IP#.eu-central-1.compute.amazonaws.com
# Update Packages and install Nginx
sudo apt-get update
sudo apt-get install -y nginx composer git
# Install and setup MySQL
@notflip
notflip / config.xml
Created May 23, 2017 08:52
Phonegap Barcode Example
<?xml version="1.0" encoding="UTF-8" ?>
<widget xmlns = "http://www.w3.org/ns/widgets"
xmlns:gap = "http://phonegap.com/ns/1.0"
id = "com.phonegap.example"
versionCode = "10"
version = "1.0.0" >
<name>Phonegap Barcodescanner</name>
<description>Barcodescanner voorbeeld</description>
<author href="https://notflip.be" email="miguel@notflip.be">Miguel Stevens</author>
@notflip
notflip / model.php
Last active March 31, 2021 18:12
Laravel WhereHasNot
public function scopeUnClaimed($query)
{
return $query->whereHas('claims',function($q) {
$q->where('dentist_id', $user->dentist->id);
}, '<', 1);
}
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use File;
use Image;
class UploadController extends Controller {
@notflip
notflip / gulpfile.js
Created July 1, 2015 09:49
Laravel Gulpfile
var gulp = require('gulp');
var sass = require('gulp-sass');
var autoprefixer = require('gulp-autoprefixer');
var minify = require('gulp-minify-css');
var uglify = require('gulp-uglify');
var concat = require('gulp-concat');
var plumber = require('gulp-plumber');
var browserSync = require('browser-sync');
var reload = browserSync.reload;
@notflip
notflip / gist:1d88c2beecc9e54f0e4f
Last active August 29, 2015 14:10
My Complete <head> File
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="HandheldFriendly" content="True">
@notflip
notflip / head
Last active December 27, 2017 11:54
_head
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,user-scalable=no">
<meta name="HandheldFriendly" content="True">
@notflip
notflip / Vagrant Beginner
Last active August 29, 2015 13:56
Vagrant Basic Apache
# Add this to the Vagrantfile
config.vm.box = "lucid32"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.provision :shell, :path => 'provision.sh'