Skip to content

Instantly share code, notes, and snippets.

@tylerhall
tylerhall / strong-passwords.php
Created August 12, 2010 21:38
A user friendly, strong password generator PHP function.
<?PHP
// Generates a strong password of N length containing at least one lower case letter,
// one uppercase letter, one digit, and one special character. The remaining characters
// in the password are chosen at random from those four sets.
//
// The available characters in each set are user friendly - there are no ambiguous
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option,
// makes it much easier for users to manually type or speak their passwords.
//
// Note: the $add_dashes option will increase the length of the password by
@balupton
balupton / README.md
Last active July 13, 2024 17:32
Ajaxify a Website with the HTML5 History API using History.js, jQuery and ScrollTo
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Deploy extends Front_Controller
{
protected $file_name = '';
protected $_path = '';
/**
* Constructor
@dhrrgn
dhrrgn / .gitconfig
Last active September 25, 2015 14:38
An awesome .gitconfig file with some niceties.
[user]
name = Your Name
email = [email protected]
[core]
autocrlf = input
[color]
status = auto
diff = auto
branch = auto
[alias]
@balupton
balupton / ajaxify-html5-native.js
Created August 15, 2011 06:38
Ajaxify a Website with the HTML5 History API, jQuery and ScrollTo
// https://gist.github.com/1145804
(function(window,undefined){
// Prepare our Variables
var
history = window.history,
$ = window.jQuery,
document = window.document;
// Check to see if the HTML5 History API is enabled for our Browser
@jdennes
jdennes / LICENSE
Last active March 7, 2024 04:40
Subscribing to a Campaign Monitor list using AJAX
The MIT License (MIT)
Copyright (c) James Dennes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@ziadoz
ziadoz / awesome-php.md
Last active July 13, 2024 05:29
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@codenamegary
codenamegary / laravel-autoconfig.php
Created March 14, 2012 01:37
Auto-Config function for laravel's index.php, sets 'LARAVEL_ENV' based on the active page URL
<?php
/*
| Set a 'urls' (note the plural) in your application.php config files.
| Example application/config/application.php for PRODUCTION:
|
| return array(
| 'urls' => array(
| 'http://productionsite.com',
| 'http://www.productionsite.com',
@jakebellacera
jakebellacera / jquery.parallaxhelper.js
Created May 16, 2012 21:47
A basic parallax helper for Scrollorama
/**
* Parallax helper using Scrollorama
*/
var parallax = function () {
var parallax = this,
$scrollorama,
cachedWindowHeight = window.innerHeight();
this.init = function () {
// load scrollorama