Skip to content

Instantly share code, notes, and snippets.

/**
*
*
* ScaleBitmap
*
* @author Didier Brun
* @author Jerôme Decoster
* @version 1.1
*
*/
/*
* AppController.j
* Created by Bruno Ronchetti on March 21, 2010
* Copyright 2010, Ronchetti & Associati.
* The MIT licence
* 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
@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
@amadeus
amadeus / gist:983364
Created May 20, 2011 17:24
Penner's easing methods in CSS
'linear:in': cubic-bezier(0,0,1,1)
'linear:out': cubic-bezier(0,0,1,1)
'linear:in:out': cubic-bezier(0,0,1,1)
'expo:in': cubic-bezier(0.71,0.01,0.83,0)
'expo:out': cubic-bezier(0.14,1,0.32,0.99)
'expo:in:out': cubic-bezier(0.85,0,0.15,1)
'circ:in': cubic-bezier(0.34,0,0.96,0.23)
'circ:out': cubic-bezier(0,0.5,0.37,0.98)
'circ:in:out': cubic-bezier(0.88,0.1,0.12,0.9)
'sine:in': cubic-bezier(0.22,0.04,0.36,0)
@jeremysuriel
jeremysuriel / desk-oauth-example-single.php
Created May 1, 2012 01:05
Desk.com Single Access Token API - PHP Example
<?php
//
// Desk.com Single Access Token API Example
//
// 1) Copy this file to the root of your webserver and change the $my_desk_url variable to point to your desk.com hostname
// 2) Go to https://[yoursite].desk.com/admin/settings/api-applications and create an API Application
// 3) Copy the consumer key & secret on the listing page after you create your API Application
// 4) Click the "Your Access Token" link to get your single access token & secret
// 5) Copy your single access token & secret and paste it into the appropriate variable in this file
//
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@sekati
sekati / xcode-build-bump.sh
Created July 24, 2012 20:44
Xcode Auto-increment Build & Version Numbers
# xcode-build-bump.sh
# @desc Auto-increment the build number every time the project is run.
# @usage
# 1. Select: your Target in Xcode
# 2. Select: Build Phases Tab
# 3. Select: Add Build Phase -> Add Run Script
# 4. Paste code below in to new "Run Script" section
# 5. Drag the "Run Script" below "Link Binaries With Libraries"
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0)
@adamloving
adamloving / temporary-email-address-domains
Last active July 24, 2024 20:49
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@tureki
tureki / lsyncd.conf
Created March 12, 2014 11:55
AWS EC2 lsyncd install and basic rsync setting
----
-- User configuration file for lsyncd.
--
-- Simple example for default rsync, but executing moves through on the target.
--
-- For more examples, see /usr/share/doc/lsyncd*/examples/
--
-- sync{default.rsyncssh, source="/var/www/html", host="localhost", targetdir="/tmp/htmlcopy/"}
settings {