Skip to content

Instantly share code, notes, and snippets.

View ThePixelDeveloper's full-sized avatar

Mathew Davies ThePixelDeveloper

View GitHub Profile
@rafi
rafi / gmail_spam_filter.md
Created December 4, 2009 10:37
Gmail spam filter

I'm sick of all those spam emails sent to my Gmail, although they are trapped in the Spam folder, sometimes I do receive legitimate emails which are mistakenly trapped in the spam folder, so this filter will delete annoying pharmaceuticals shit and crap watches spam emails so looking at the spam will be a little easier.

Subject: Pfizer OR RxMed OR RxMeds OR Ritalin OR Phentermin OR AnxietyMedications OR Weightl0ss OR Vicodin OR Oxycodone OR noprescription OR hydrocodone OR "Herbal Pills" OR ("risk free" AND pills) OR "longer and stronger in bed" OR "help falling in sleep" OR "unique web offer" OR (without AND prescription) OR (fda AND drugs) OR "refill notice" OR (long AND stronger AND bed) OR ((favorite OR pain OR cheaper OR online OR refill OR order) AND (medication OR medications OR med OR meds)) OR Xanax OR Viagra OR Phentermine OR RxMedications OR (Refill AND PreScript) OR (Replica AND Watches) OR (Percocet AND (Shipped OR Available)) OR (larger AND penis) OR Phentrmine OR Cialis

Has the words:

@evopix
evopix / KohanaForumHideRussian.user.js
Last active September 24, 2015 17:47
Removing jQuery dependency and updating to work with Scriptish.
// ==UserScript==
// @id forum.kohanaframework.org-d0515b72-1b32-4b30-a2e6-ab4f0f3fbb13@evopix
// @name KohanaForumHideRussian
// @version 2.0
// @namespace evopix
// @author Brandon Summers
// @description Hide Russian threads from Kohana forum.
// @include *forum.kohanaframework.*
// @run-at document-end
// ==/UserScript==
@nicolas-grekas
nicolas-grekas / Advanced-HTTP-en.md
Created June 15, 2011 22:03
Advanced handling of HTTP requests in PHP
<?php
// Get a token ..
$provider = $this->request->param('provider');
$consumer = OAuth2_Consumer::factory($provider);
$token = $consumer->request_token(array('code' => $this->request->query('code')));
Session::instance()->set('oauth2.token.'.$provider, $token);
@ziadoz
ziadoz / awesome-php.md
Last active May 8, 2025 07:37
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@hakre
hakre / some-iterator-fun.php
Created February 28, 2012 06:59
Some Iterator Fun
<?php
/*
* Some Iterator Fun
*
* @link http://hakre.wordpress.com/2012/02/28/some-php-iterator-fun/
*/
/**
* Iterator that fetches each iteration value from a
@igrigorik
igrigorik / file.html
Created July 6, 2012 08:01
Example of early head flush on load time
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Hello</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
Hello World
</body>
# To install prerequisites for this sample code, run
# the following commands in a directory with all the
# files in this gist:
#
# > gem install bundler
# > bundler install
source "http://rubygems.org/"
gem "thor", "0.15.4"
<?php
class Arden_Repository_Users extends Arden_Repository_KohanaDatabase
{
protected $_model_class = 'Model_User';
protected $_table_name = 'users';
public function find_users()
{
return $this->load_set([]);
@nikic
nikic / password_hashing_api.md
Created September 12, 2012 15:04
The new Secure Password Hashing API in PHP 5.5

The new Secure Password Hashing API in PHP 5.5

The [RFC for a new simple to use password hashing API][rfc] has just been accepted for PHP 5.5. As the RFC itself is rather technical and most of the sample codes are something you should not use, I want to give a very quick overview of the new API:

Why do we need a new API?

Everybody knows that you should be hashing their passwords using bcrypt, but still a surprising number of developers uses insecure md5 or sha1 hashes (just look at the recent password leaks). One of the reasons for this is that the crypt() API is ridiculously hard to use and very prone to programming mistakes.