Skip to content

Instantly share code, notes, and snippets.

@arodu
arodu / Operaciones-Git
Created October 16, 2015 19:48 — forked from jelcaf/Operaciones-Git
Git Tips - Mini-trucos de Git para facilitarme la tarea
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
@arodu
arodu / bootstrap_cake_pagination.php
Created June 11, 2016 11:28 — forked from thomseddon/bootstrap_cake_pagination.php
Bootstrap style CakePHP pagination
<p>
<?php
echo $this->Paginator->counter(array(
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
));
?>
</p>
<ul class="pagination">
<?php
echo $this->Paginator->prev('&laquo;', array('tag' => 'li', 'escape' => false), '<a href="#">&laquo;</a>', array('class' => 'prev disabled', 'tag' => 'li', 'escape' => false));
@arodu
arodu / README.md
Created August 15, 2016 22:24 — forked from hofmannsven/README.md
My simple SCSS Cheatsheet
@arodu
arodu / longPolling.js
Created August 18, 2016 16:18 — forked from jasdeepkhalsa/longPolling.js
Simple Long Polling Example with JavaScript and jQuery by Tian Davis (@tiandavis) from Techoctave.com (http://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery)
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast)
(function poll(){
$.ajax({ url: "server", success: function(data){
//Update your dashboard gauge
salesGauge.setValue(data.value);
}, dataType: "json", complete: poll, timeout: 30000 });
})();
@arodu
arodu / BootstrapFormHelper.php
Created November 18, 2016 20:41 — forked from trajakovic/BootstrapFormHelper.php
This file is taken from https://github.com/CCadere/CakePHP-Forms-Bootstrap-2.3-Helper/blob/master/View/Helper/BootstrapFormHelper.php, and slightly modified/extended. Added support for has-error bs3 validation error class.
<?php
/**
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
*
* Licensed under The MIT License
*
* Copyright (c) La Pâtisserie, Inc. (http://patisserie.keensoftware.com/)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::uses('FormHelper', 'View/Helper');
@arodu
arodu / color.sh
Created March 24, 2017 13:39 — forked from lordii/color.sh
Color in genmon (xfce plugin)
#pango markup
echo "<txt><span foreground=\"#667899\">Test</span></txt>"
@arodu
arodu / autohide.sh
Created May 18, 2017 15:04
Toggle autohide: none / intelligent for xfce
#!/usr/bin/env bash
current=$(xfconf-query -c xfce4-panel -p /panels/panel-0/autohide-behavior)
if [[ "$current" == "1" ]]; then
current="0"
else
current="1"
fi
@arodu
arodu / instalacion.md
Created March 8, 2018 14:01 — forked from pokisin/instalacion.md
Instalar LAMP en arch linux (Manjaro)

Pasos para instalar LAMP en Manjaro

  1. Abrimos la terminal y ejecutamos la siguiente linea para actualizar la base de datos de los paquetes
  sudo pacman -Syu
  1. Instalamos el apache y ejecutamos lo siguiente
  sudo pacman -S apache
@arodu
arodu / emojis.json
Created July 18, 2018 17:59 — forked from oliveratgithub/emojis.json
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family_mothers_two_girls", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family_mothers_children", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family_mothers_two_boys", "shortname": "", "unicode": "", "html": "&#128105;&zwj;&#128105;&zwj;&#128102;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family_two_girls", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128103;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👧‍👦", "name": "family_children", "shortname": "", "unicode": "", "html": "&#128104;&zwj;&#128105;&zwj;&#128103;&zwj;&#128102;", "category": "p", "order": ""},
{"emoji": "👨‍👩‍👦‍👦", "name": "family_two_boys", "shortname": "", "unicode": "", "html": "&#128104;&zw
@arodu
arodu / local-storage-with-json-parse-stringify.js
Created January 4, 2019 17:13 — forked from jbail/local-storage-with-json-parse-stringify.js
Local storage with JSON parse and stringify
var animal = {
name: 'Karl',
type: 'cat',
color: 'black',
age: 7
};
//convert JSON animal into a string
var dehydratedAnimal = JSON.stringify(animal);