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 / mouse.py
Last active August 4, 2019 08:48
Python Joystick Mouse
#!/usr/bin/env python3
import spidev
import time
import struct
spi = spidev.SpiDev()
spi.open(0,0)
spi.max_speed_hz=100000
deadzone = 20
@notflip
notflip / wpa_supplicant.conf
Created May 16, 2019 10:45
WPA Supplicant Raspberry PI 3
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=BE
network={
ssid="Ssid"
psk="Password"
key_mgmt=WPA-PSK
}
@notflip
notflip / data.js
Last active November 30, 2018 16:01
NoSQL Model
"users": [
"user1": {
"id": "user1",
"username": "Notflip"
}
]
"categories": [
"category1": {
"name": "Productivity",
@notflip
notflip / spacing.scss
Created November 17, 2017 13:44
Bootstrap 4 Spacing for Bootstrap 3
$grid-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px
) !default;
$spacer: 20px !default;
$spacers: (
@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="[email protected]">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">