Skip to content

Instantly share code, notes, and snippets.

View tgirardi's full-sized avatar

Tomás Girardi tgirardi

  • Turbomarket S.A.
  • Viña del Mar, Chile
View GitHub Profile
// 1. Go to your linkedin post and load all comments
// 2. Open your browser's web development tools and paste this on the console.
// 3. Replace the reply message with your own
// 4. then run:
// * reply() to reply the current comment (highlighted in yellow)
// * next() to skip that comment
// * autoreply() to reply all automatically (it takes about 15 seconds to reply to each comment,
// but you can adjust the period variable if you want to try to do it faster - some replies could fail to post)
// Use at your own risk. There's no warranty linkedin will not block you if you abuse this tool
@tgirardi
tgirardi / click2dial.php
Last active April 27, 2018 23:28
Example PHP script you can use to initiate calls through HTTP requests using an Asterisk Server. You must install and configure an HTTP server with PHP enabled. Also, read the comments in the file to adjust it correctly and know better what you need to do
// Don't forget to change values for $username and $secret (where it says PUT_YOUR_USERNAME_HERE and PUT_YOUR_PASSWORD_HERE)
<?if (!empty( $_REQUEST['phone']) && !empty( $_REQUEST['exten'] ) )
{
$num = $_REQUEST['phone'];
$ext = $_REQUEST['exten'];
$num = preg_replace( "/^\+7/", "8", $num );
$num = preg_replace( "/\D/", "", $num );
$username = 'PUT_YOUR_USERNAME_HERE';
$secret = 'PUT_YOUR_PASSWORD_HERE';
$timeout = 10;
@tgirardi
tgirardi / tittle-toggle.html
Last active February 13, 2018 10:48
Tab title toggle to recover visitors who went to another tab
<!-- TITLE TOGGLE - paste this just above the </body> tag -->
<script>
(function () {
var t1 = document.title;
var t2 = 'Come BACK! 💘 DON\'T FORGET ME !!'; // <-- CUSTOMIZE THIS
var interval;
window.addEventListener('blur', function () {
interval = window.setInterval(function () {
(function () {
// nombre de la clase del botón para seguir cuentas
var NOMBRE_CLASE_BOTON = '_aj7mu';
// nombre clase del elemento que lista cada cuenta
var NOMBRE_CLASE_LISTADO = '_539vh';
// nombre clase de cada item de la lista de cuentas
var NOMBRE_CLASE_ITEM_LISTADO = '_cx1ua';
// texto de los botones que sirven para seguir cuentas
var TEXTO_BOTON = 'Follow'; // en español usar 'Seguir'
@tgirardi
tgirardi / os-x-update-tzdata.sh
Last active August 29, 2023 15:48
Update tzdata and ICU data on OS X to fix problems with outdated DST information (needs reboot)
#!/bin/bash
# author: Tomás Girardi
# Based on http://helw.net/2011/04/28/updating-osx-for-egypts-dst-changes/ by Ahmed El-Helw
# CHANGE THIS:
# go to https://www.iana.org/time-zones and get the URL for the last DATA
# release
URLTZDATASRC=https://www.iana.org/time-zones/repository/releases/tzdata2016d.tar.gz
# BACKUP your current icu file first
@tgirardi
tgirardi / os-x-update-tzdata.sh
Created May 17, 2016 03:36
Update tzdata and ICU data on OS X to fix problems with outdate DST information
#!/bin/bash
# author: Tomás Girardi
# Based on http://helw.net/2011/04/28/updating-osx-for-egypts-dst-changes/ by Ahmed El-Helw
# CHANGE THIS:
# go to https://www.iana.org/time-zones and get the URL for the last DATA
# release
URLTZDATASRC=https://www.iana.org/time-zones/repository/releases/tzdata2016d.tar.gz
ICUVERSION=`ls /usr/share/icu/*.dat | grep -o "\(\d\d\)l\.dat" | grep -o "^\d\d"`
@tgirardi
tgirardi / flujo_trabajo_stories.md
Last active August 29, 2015 14:24
Diagrama de Flujo de Trabajo que Uso para Programar Stories
![Diagrama](http://g.gravizo.com/g?
digraph G {
splines=true; esep=20; K=0.1;
node[shape="box"]
init[label="Iniciar%5CnTrabajo%5CnStory",shape="invhouse"]
a[label="Entender story"]
b[label="Diagnosticar / Diseñar"]
c[label="Crear nuevo branch"]
d[label="Desarrollar specs mocha"]