Skip to content

Instantly share code, notes, and snippets.

@lukevers
lukevers / # php71 - 2018-02-07_12-30-53.txt
Created February 7, 2018 17:34
php71 (homebrew/php/php71) on macOS 10.13 - Homebrew build logs
Homebrew build logs for homebrew/php/php71 on macOS 10.13
Build date: 2018-02-07 12:30:53
<?php
public function handle($request, Closure $next)
{
if (
Auth::check()
&& empty(Auth::user()->onboarded_at)
&& ! $request->is('welcome')
&& ! $request->is('i/*')
&& ! $request->is('logout')
) {
@lukevers
lukevers / controller.php
Last active October 27, 2017 15:33
Zbig Labacz
<?php
require_once 'Db.php';
class apiController
{
protected $db;
/**
* Db

Keybase proof

I hereby claim:

  • I am lukevers on github.
  • I am lukevers (https://keybase.io/lukevers) on keybase.
  • I have a public key ASCcB8PAU2YqKmiKUvcZzmg3Ygo_dmyFHeUYQjepWpl2KAo

To claim this, I am signing this object:

@lukevers
lukevers / colormeter.js
Created October 31, 2016 20:47 — forked from mailtruck/colormeter.js
Calculate difference in percentage between 2 hex colors
function color_meter(cwith, ccolor) {
if (!cwith && !ccolor) return;
var _cwith = (cwith.charAt(0)=="#") ? cwith.substring(1,7) : cwith;
var _ccolor = (ccolor.charAt(0)=="#") ? ccolor.substring(1,7) : ccolor;
var _r = parseInt(_cwith.substring(0,2), 16);
var _g = parseInt(_cwith.substring(2,4), 16);
var _b = parseInt(_cwith.substring(4,6), 16);
@lukevers
lukevers / WIP.md
Created October 28, 2016 17:26 — forked from till/WIP.md
OpsWorks + DigitalOcean = ❤️

Register a droplet in AWS OpsWorks

AWS Requirements

  • create a new IAM user and attach the AWS OpsWorks Register Policy
  • for testing: create a new stack on AWS OpsWorks and fetch its ID
  • customize all variables prefixed with YOUR_ from the cloud-config.yml

DigitalOcean

@lukevers
lukevers / gif.sh
Created October 3, 2016 18:25
Making gifs
#!/bin/sh
palette="/tmp/palette.png"
filters="fps=15,scale=-1:-1:flags=lanczos"
ffmpeg -v warning -i $1 -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i $1 -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $2
@lukevers
lukevers / xmlrpc_xml_output.rb
Created May 26, 2016 17:44
Get raw XML from xmlrpc
# https://www.ruby-forum.com/topic/111899
class XMLRPC::Client
def mycall(method, *args)
request = create().methodCall(method, *args)
data = do_rpc(request, false)
end
end
# .call
@lukevers
lukevers / LaravelInterviewQuestions.md
Created October 23, 2015 15:23
Laravel Interview Questions

Laravel 5 Interview Questions

This is a compiled list of Laravel interview questions. If Laravel is an engineer's PHP framework of choice, they definitely have potential to be a good candidate, but a lot of new PHP engineers have been into Laravel too. The framework itself is very welcoming to newcomers, which makes it easy for beginners to feel that they know more than they really do.

General Questions

1. How long have you been using Laravel?

This question can help decide what level of questions to ask.

@lukevers
lukevers / shoprite.js
Created June 17, 2015 00:38
Add all coupons to your shoprite card on the current page you're on.
$('.coupon-item-button-available').map(function(index, item) {
$(this).click();
});