Skip to content

Instantly share code, notes, and snippets.

View rodrisan's full-sized avatar
🏠
Working from home

Rodrigo S rodrisan

🏠
Working from home
View GitHub Profile
@yevgenko
yevgenko / .Xdefaults
Created August 24, 2011 02:58
URxvt settings with solarized theme
!-------------------------------------------------------------------------------
! Xft settings
!-------------------------------------------------------------------------------
Xft.dpi: 96
Xft.antialias: false
Xft.rgba: rgb
Xft.hinting: true
Xft.hintstyle: hintslight
@albertopadilla
albertopadilla / gist:1330091
Created November 1, 2011 07:24
i18n Translation Spanish (Mexico - Tú)
# Additional translations at http://github.com/plataformatec/devise/wiki/I18n
es:
errors:
messages:
expired: "ha expirado, por favor pida uno nuevo"
not_found: "no encontrado"
already_confirmed: "ya está confirmada, por favor intente ingresar"
not_locked: "no está bloqueada"
not_saved:
@arsisakarn
arsisakarn / gist:1450450
Last active June 4, 2018 18:05
Symfony 2 set and read cookie
<?php
public function testSetCookieAction()
{
$value = '12345';
$html = '<html><body>test set cookie varName =' . $value . '</body></html>';
$response = new Response($html);
$response->headers->setCookie(new Cookie('varName', $value, time() + (3600 * 48)));
return $response;
}
@tsabat
tsabat / zsh.md
Last active October 10, 2025 00:44
Getting oh-my-zsh to work in Ubuntu
@benbalter
benbalter / wp-db.tutorial.php
Created January 13, 2012 18:41
WordPress DB Tutorial
<?php
//absolute path to wp-load.php, or relative to this script
//e.g., ../wp-core/wp-load.php
include( 'trunk/wp-load.php' );
//grab the WPDB database object, using WP's database
//more info: http://codex.wordpress.org/Class_Reference/wpdb
global $wpdb;
@jxson
jxson / README.md
Created February 10, 2012 00:18
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

@oodavid
oodavid / README.md
Last active November 5, 2025 05:24 — forked from aronwoost/README.md
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@spycos
spycos / UAgentInfo.java
Created February 28, 2012 12:02 — forked from bryanjswift/UAgentInfo.java
User Agent detection in Java
/* *******************************************
// LICENSE INFORMATION
// The code, "Detecting Smartphones Using PHP"
// by Anthony Hand, is licensed under a Creative Commons
// Attribution 3.0 United States License.
//
// Updated 01 March 2010 by Bryan J Swift
// - Remove un-needed if statements instead just returning the boolean
// inside the if clause
//
@jbreitenbucher
jbreitenbucher / gist:1996830
Created March 7, 2012 22:45
WordPress: Custom Post Type Template
<?php
/**
* Post Types
*
* This file registers any custom post types
*
* @package dorman-farrell
* @author The Pedestal Group <[email protected]>
* @copyright Copyright (c) 2012, Dorman Farrell
* @license http://opensource.org/licenses/gpl-2.0.php GNU Public License
@chrisguitarguy
chrisguitarguy / wpse45134.php
Created March 10, 2012 17:54
Don't allow people to view the default WordPress registration page
<?php
/*
Plugin Name: Registration Redirect
Description: Don't allow people to view the default registration page
Author: Christopher Davis
Author URI: http://christopherdavis.me
License: GPL2
*/
add_action( 'login_form_register', 'wpse45134_catch_register' );