Skip to content

Instantly share code, notes, and snippets.

@cesarhdz
cesarhdz / _wordpress-es_ES-lang.md
Last active August 29, 2015 13:56
WordPress language files for Spanish

WordPress es_ES lang useful in Composer

// Place your Spring DSL code here
import org.springframework.security.web.context.HttpSessionSecurityContextRepository
import grails.plugin.springsecurity.web.authentication.AjaxAwareAuthenticationEntryPoint
import org.springframework.security.core.context.SecurityContext
import org.springframework.security.core.context.SecurityContextHolder
import org.springframework.security.web.context.NullSecurityContextRepository
import org.springframework.security.web.context.HttpRequestResponseHolder
import javax.servlet.http.HttpServletRequest
[
{ "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["alt+up"], "command": "swap_line_up" },
{ "keys": ["alt+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+shift+down"], "command": "select_lines", "args": {"forward": true} },
{ "keys": ["ctrl+shift+up"], "command": "select_lines", "args": {"forward": false} },
// Ajustar lineas en CSS
{ "keys": ["ctrl+shift+alt+c"], "command": "css_sorter" },
@cesarhdz
cesarhdz / index.jade
Created October 28, 2014 19:50
A Pen by César Hernández.
form
h1 New Invoice
fieldset
legend Client Info
.field
label(for=rfc) RFC
input(id=rfc, placeholder="ABX000102XYZ")
.field
label(for=name) Name
input(id=name, placeholder='Razón Social')
@cesarhdz
cesarhdz / gist:ae641b50e7930fb50261
Created June 24, 2015 16:47
404-allsite.htaccess
RewriteRule / - [L,R=404]
@cesarhdz
cesarhdz / gist:2085584
Created March 18, 2012 23:42
PHP:WP 404 error page
<div id="content-full" class="grid col-940">
<div id="post-0" class="error404">
<div class="post-entry">
<h1 class="title-404"><?php _e('404 &#8212; Fancy meeting you here!', 'responsive'); ?></h1>
<p><?php _e('Don&#39;t panic, we&#39;ll get through this together. Let&#39;s explore our options here.', 'responsive'); ?></p>
<h6><?php _e( 'You can return', 'responsive' ); ?> <a href="<?php echo home_url(); ?>/" title="<?php esc_attr_e( 'Home', 'responsive' ); ?>"><?php _e( '&larr; Home', 'responsive' ); ?></a> <?php _e( 'or search for the page you were looking for', 'responsive' ); ?></h6>
<?php get_search_form(); ?>
</div><!-- end of .post-entry -->
</div><!-- end of #post-0 -->
</div><!-- end of #content-full -->
@cesarhdz
cesarhdz / test.php
Created March 18, 2012 23:24
PHP:WP:current_time
function current_time( $type, $gmt = 0 ) {
switch ( $type ) {
case 'mysql':
return ( $gmt ) ? gmdate( 'Y-m-d H:i:s' ) : gmdate( 'Y-m-d H:i:s', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );
break;
case 'timestamp':
return ( $gmt ) ? time() : time() + ( get_option( 'gmt_offset' ) * 3600 );
break;
}
}
RewriteEngine On
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php/$1
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Welcome extends CI_Controller {
/**
* Index Page for this controller.
*/
public function index()
{
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cross-browser kerning-pairs & ligatures</title>
<style>
body { font-family: sans-serif; background: #f4f3f3; color: rgba(40, 30, 0, 1); width: 500px; margin: 80px auto; padding: 0px; }
a { color: rgba(15, 10, 0, 0.8); text-decoration: none; border-bottom: 1px solid; padding: 1px 1px 0px; -webkit-transition: background 1s ease; }
a:hover { background: rgba(0, 220, 220, 0.2); }
p, li { line-height: 1.5; padding: 0em 1em 0em 0em; margin: 0em 0em 0.5em; }