Skip to content

Instantly share code, notes, and snippets.

View jesuserro's full-sized avatar
🧩
Type-safe by day, data-driven by night.

Jesús Erro jesuserro

🧩
Type-safe by day, data-driven by night.
View GitHub Profile
@jesuserro
jesuserro / SHORTCUTS.md
Last active January 31, 2022 10:50
Mis shortcuts

Mis hotkeys

Roam-highlighter Shortcut Keys (v2.1.1)

Option Description
ALT + X Activate Extension and Show/Hide Side Window
Ctrl + X Highlights selected text. To remove part of a highlight, select text and press [Ctrl + X]
@jesuserro
jesuserro / History\-1b699c25\entries.json
Last active October 24, 2022 06:58
Visual Studio Code Settings Sync Gist (Shift + Alt + U)
{"version":1,"resource":"file://wsl.localhost/Ubuntu/var/www/html/localidades/public/.htaccess","entries":[{"id":"gNhY","timestamp":1664878682944}]}
@jesuserro
jesuserro / xtemplate.js
Last active January 3, 2019 08:05
Extjs 3.4 XTemplate samples
xtype: 'templatecolumn',
dataIndex: 'neto'
tpl: new Ext.XTemplate(
'<div>{[this.getValues(values)]}</div>',
// This tpl if is within column "neto": other fields needs "values." only within "if"
'<tpl if="neto && values.divisa_coste_codigo_iso">',
'<div>{neto} {divisa_coste_codigo_iso}</div>',
'</tpl>',
// In other columns:
'<tpl for="this.getPartes([values.lista_idcdr])">',
@jesuserro
jesuserro / commands.sh
Last active May 9, 2016 09:59
Command Line
tail -f /var/log/apache2/error.log
find -name "*.svn"
sudo apt-get install xbacklight
xbacklight -set 20
cd ~/.oh-my-zsh/themes/
# Refrescar estilos ZSH
@jesuserro
jesuserro / login.php
Last active October 14, 2015 14:44
Login and Process Page
<?php
// @see http://www.sanwebe.com/2012/11/login-with-google-api-php
########## Google Settings.Client ID, Client Secret from https://console.developers.google.com #############
$client_id = 'xxxxxxxxxxxxxxxxxx';
$client_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$redirect_uri = 'http://path-to-script/google-login-api/';
########## MySql details #############
$db_username = "xxxxxxxxx"; //Database Username
$db_password = "xxxxxxxxx"; //Database Password
afterlayout : {
fn: function(p){
console.info("afterlayout");
console.log(p);
p.disable();
}, single: true // important, as many layouts can occur
}
@jesuserro
jesuserro / Ejecutar Macros
Created June 26, 2015 09:23
Shell SSH. En PhpStorm -> Settings -> Remote SSH External Tools
#!/bin/bash
echo "Hello, World!"
echo "Knowledge is power."
@jesuserro
jesuserro / Debugging events
Last active May 7, 2024 08:13
Extjs 3.4.0
/**
* Usage: put this on Chrome Console and listen...
* This example listens a grid's store object -> yourGrid.getStore()
* var yourGrid = Ext.getCmp('put-object-id-here');
*/
Ext.util.Observable.capture(
Ext.getCmp('put-grid-object-id-here').getStore(),
function(e){
console.log(e)
}
@jesuserro
jesuserro / Record Creation
Last active August 2, 2016 08:33
Extjs 3.4.0
Forma 1:
this.Record = new Ext.data.Record.create([
'id', 'padre_id', 'agrupacion', 'nombre', 'descripcion',
'inferior','tipo', 'no_destacar', 'observacion', 'activo',
'comentario', 'ult_act', 'ult_usu', 'padre'
]);
/**
* Usage:
* var producto = new this.treeProducto.Record( data[0] );
@jesuserro
jesuserro / beers.js
Created April 15, 2013 17:57
Angularjs example: BeerCounter
function BeerCounter($scope, $locale) {
$scope.beers = [0, 1, 2, 3, 4, 5, 6];
if ($locale.id == 'en-us') {
$scope.beerForms = {
0: 'no beers',
one: '{} beer',
other: '{} beers'
};
} else {
$scope.beerForms = {