For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
#! /usr/bin/env php | |
<?php | |
/*** | |
* PageSnap | |
* | |
* Script for archiving a HTML page (and associated media assets) into a single file. | |
* | |
* Requires: | |
* |
require 'formula' | |
class Fetchmail < Formula | |
# note that the following url is actually a javascript redirection. | |
# download the associated file and place it into /Library/Caches/Homebrew | |
homepage 'http://www.fetchmail.info/' | |
url 'http://prdownload.berlios.de/fetchmail/fetchmail-6.3.21.tar.bz2' | |
# md5 '548f152df27d32b632afa4f1a8a6cd1a' | |
md5 '0ad8eac47e85bd0ae63870daa09992af' |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Session extends CI_Session{ | |
private $sess_use_redis = TRUE; | |
private $redis = ''; | |
public function __construct($params = array()) { | |
//parent::__construct(); | |
$this->CI =& get_instance(); |
<snippet> | |
<content><![CDATA[ | |
// ${1} Resource | |
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index')); | |
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show')); | |
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new')); | |
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit')); | |
Route::post('${1}s', '${1}s@create'); | |
Route::put('${1}s/(:any)', '${1}s@update'); | |
Route::delete('${1}s/(:any)', '${1}s@destroy'); |
<?php | |
// Resizer and Image Manipulation | |
// Based on: http://forums.laravel.com/viewtopic.php?id=2648 | |
public function post_edit_logo($id) | |
{ | |
$rules = array( | |
'image' => 'image', | |
); |
@media only screen and (min-width: 320px) { | |
/* Small screen, non-retina */ | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
# Configuring basic RADIUS on OS X 10.8 Server | |
# Jedda Wignall | |
# http://jedda.me | |
# Full writeup at: http://jedda.me/2012/11/configuring-basic-radius-os-108-server/ | |
# create the SACL for access to RADIUS | |
dseditgroup -q -o create -u <admin user> -n . com.apple.access_radius | |
# configure radiusd to log both successful and failed authentications |
desc "Create a new version tag and push a new podspec" | |
task :release do | |
require 'cocoapods' | |
require 'colored' | |
version = Pod::Specification.from_file(Pathname.pwd + 'MyLib.podspec').version | |
puts "Releasing version `#{version}'. Is that correct? (y/n)" | |
if $stdin.gets.strip.downcase == 'y' | |
sh "git tag -a #{version} -m 'Release #{version}'" | |
sh "git push --tags" | |
sh "pod lint" |
<?php | |
use Illuminate\Database\Migrations\Migration; | |
use Illuminate\Database\Schema\Blueprint; | |
class PivotPostTagTable extends Migration { | |
/** | |
* Run the migrations. | |
* |