Skip to content

Instantly share code, notes, and snippets.

@vesper8
vesper8 / downloadLaracon2017.sh
Created August 25, 2017 05:00
Laracon US 2017 - youtube-dl batch file.
youtube-dl https://www.streamacon.com/video/laracon-us-2017/day-1-freek-van-der-herten
youtube-dl https://www.streamacon.com/video/laracon-us-2017/day-1-tom-schlick
youtube-dl https://www.streamacon.com/video/laracon-us-2017/day-1-adam-wathan
youtube-dl https://www.streamacon.com/video/laracon-us-2017/day-1-maxime-locqueville
youtube-dl https://www.streamacon.com/video/laracon-us-2017/day-1-evan-you
youtube-dl https://www.streamacon.com/video/laracon-us-2017/day-1-nils-adermann
youtube-dl https://www.streamacon.com/video/laracon-us-2017/day-1-taylor-otwell
youtube-dl https://www.streamacon.com/video/laracon-us-2017/day-1-blackfireio
youtube-dl https://www.streamacon.com/video/laracon-us-2017/day-1-nexmo
youtube-dl https://www.streamacon.com/video/laracon-us-2017/day-1-vehikl
@vesper8
vesper8 / exportMySQLUsersPDO.php
Created September 24, 2017 12:11 — forked from zaiddabaeen/exportMySQLUsersPDO.php
Exports MySQL Users and Privileges using PDO
* Feel free to improve it.
* Original by Janich: https://gist.github.com/janich/6121771
*
* @requires PHP 5.3+
* @package ExportMySQLUsers
* @author Zaid Daba'een
* @license http://www.dbad-license.org/ DBAD license
*/
// Set up database root credentials
$host = 'localhost';
@vesper8
vesper8 / aws_ses.bash
Created October 26, 2017 03:04 — forked from umrashrf/aws_ses.bash
Amazon AWS CLI - SES SEND EMAIL
sudo pip install awscli
aws configure
aws ses send-email \
--from "john@gmail.com" \
--destination "ToAddresses=mike@gmail.com" \
--message "Subject={Data=from ses,Charset=utf8},Body={Text={Data=ses says hi,Charset=utf8},Html={Data=,Charset=utf8}}"
@vesper8
vesper8 / webpack.mix.js
Created November 22, 2017 06:21 — forked from reinink/webpack.mix.js
Using Purgecss with Tailwind and Laravel Mix
let cssImport = require('postcss-import')
let cssNext = require('postcss-cssnext')
let glob = require('glob-all')
let mix = require('laravel-mix')
let purgeCss = require('purgecss-webpack-plugin')
let tailwind = require('tailwindcss')
mix.js('resources/assets/js/app.js', 'public/js')
.postCss('resources/assets/css/app.css', 'public/css/app.css', [
cssImport(),
@vesper8
vesper8 / fix-homebrew-npm.md
Created December 6, 2017 04:13 — forked from DanHerbert/fix-homebrew-npm.md
Instructions on how to fix npm if you've installed Node through Homebrew on Mac OS X or Linuxbrew

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

Before you start, make a note of any globally installed npm packages. These instructions will have you remove all of those packages. After you're finished you'll need to re-install them.

@vesper8
vesper8 / packed-pixels-switchresx.md
Created December 21, 2017 21:07 — forked from sfcgeorge/packed-pixels-switchresx.md
Packed Pixels HiDPI Retina using SwitchResX

On OS X the Packed Pixels display won't automatically show up as "Retina" or "HiDPI" resolution, instead the OS will use the full resolution of the display making everything tiny. This can be changed using the 3rd party app (non-free) SwitchResX.

First, download SwitchResX.

You can play with the resolutions for the Packed Pixels which is probably listed as Color LCD (2). However not all of the HiDPI resolutions work due to an OS X bug. If you are happy with any of the ones that do work then stop here, else continue.

If you're on El Capitan or later you need to disable System Integrity Protection (temporarily) to add a custom resolution for Packed Pixels. Follow the instructions from SwitchResX creator.

Now add a Custom Resolution that is "scaled". It must be 2 pixels bigger or smaller than the native resolution in one direction (this is the OS X quirk). I found bigger makes it slightly blurry so go w

@vesper8
vesper8 / Contract Killer 3.md
Created December 27, 2017 21:25 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@vesper8
vesper8 / haversine.php
Created February 18, 2018 11:07 — forked from fhferreira/haversine.php
Haversine Method for model Laravel.
<?php
/*
* find the n closest locations
* @param Model $query eloquent model
* @param float $lat latitude of the point of interest
* @param float $lng longitude of the point of interest
* @param float $max_distance distance in miles or km
* @param string $units miles or kilometers
* @param Array $fiels to return
* @return array
@vesper8
vesper8 / History|-1033d7fb|entries.json
Last active May 21, 2022 18:22
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Volumes/Memories/Photos/2012/PictureBright/DEV/_NS/2020/omega-api.nomadsoulmates.com/tests/Feature/Money/AppleAppStoreTest.php","entries":[{"id":"EDPV.php","source":"searchReplace.source","timestamp":1653050528409}]}