Skip to content

Instantly share code, notes, and snippets.

View mirzabusatlic's full-sized avatar

codepuppet mirzabusatlic

View GitHub Profile
@cluppi
cluppi / after.sh
Created March 19, 2015 19:01
Turning SSL on for Homestead
#!/bin/sh
# Config for SSL.
echo "--- Making SSL Directory ---"
mkdir /etc/nginx/ssl
echo "--- Copying $i SSL crt and key ---"
openssl req -nodes -new -x509 -keyout /etc/nginx/ssl/server.key -out /etc/nginx/ssl/server.crt -subj "/C=US/ST=NY/L=NYC/O=Dis/CN=www.example.com"
echo "--- Turning SSL on in nginx.conf. ---"
@ziadoz
ziadoz / BCrypt.php
Created July 30, 2012 17:43
A Lightweight PHP BCrypt Class
<?php
class BCrypt
{
/**
* Work factor cost boundaries and default.
*
* @var const
*/
const COST_MIN = 4;
const COST_MAX = 31;
@johngrimes
johngrimes / date.sql
Created May 21, 2010 07:03
MySQL Date Dimension Build Script
/* Adapted from Tom Cunningham's 'Data Warehousing with MySql' (www.meansandends.com/mysql-data-warehouse) */
###### small-numbers table
DROP TABLE IF EXISTS numbers_small;
CREATE TABLE numbers_small (number INT);
INSERT INTO numbers_small VALUES (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
###### main numbers table
DROP TABLE IF EXISTS numbers;
CREATE TABLE numbers (number BIGINT);