Skip to content

Instantly share code, notes, and snippets.

@techtonik
techtonik / findfiles.py
Created June 2, 2013 20:23
Python - case-insensitive glob
# snippet is placed into public domain by
# anatoly techtonik <[email protected]>
# http://stackoverflow.com/questions/8151300/ignore-case-in-glob-on-linux
import fnmatch
import os
import re
def findfiles(which, where='.'):
@rrosiek
rrosiek / install_mysql.sh
Last active October 1, 2024 03:05
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Tested with Ubuntu 16.04.
#! /usr/bin/env bash
###
#
# install_mysql.sh
#
# This script assumes your Vagrantfile has been configured to map the root of
# your application to /vagrant and that your web root is the "public" folder
# (Laravel standard). Standard and error output is sent to
# /vagrant/vm_build.log during provisioning.
@tom--
tom-- / Random bytes, ints, UUIDs in PHP.md
Last active November 4, 2024 19:12
PHP random bytes, integers and UUIDs

Random bytes, ints, UUIDs in PHP

Simple and safe random getters to copy-paste

string randomBytes( int $length )

int randomInt ( int $min , int $max )

string randomUuid ( void )