Skip to content

Instantly share code, notes, and snippets.

View jrodriguez-ifuelinteractive's full-sized avatar

Jesus Rodriguez jrodriguez-ifuelinteractive

View GitHub Profile
Alex en_US # Most people recognize me by my voice.
Alice it_IT # Salve, mi chiamo Alice e sono una voce italiana.
Alva sv_SE # Hej, jag heter Alva. Jag är en svensk röst.
Amelie fr_CA # Bonjour, je m’appelle Amelie. Je suis une voix canadienne.
Anna de_DE # Hallo, ich heiße Anna und ich bin eine deutsche Stimme.
Carmit he_IL # שלום. קוראים לי כרמית, ואני קול בשפה העברית.
Damayanti id_ID # Halo, nama saya Damayanti. Saya berbahasa Indonesia.
Daniel en_GB # Hello, my name is Daniel. I am a British-English voice.
Diego es_AR # Hola, me llamo Diego y soy una voz española.
Ellen nl_BE # Hallo, mijn naam is Ellen. Ik ben een Belgische stem.
<?php
$date = new DateTime('2019-01-21 00:00:00', new DateTimeZone('America/New_York'));
$date->setTimeZone(new DateTimeZone('UTC')); // New timezone
echo $date->format('Y-m-d H:i:s e'); //2019-01-21 05:00:00 UTC
<?php
$date = new DateTime('2019-01-21 00:00:00', new DateTimeZone('America/New_York'));
<?php
$dateString = '2019-01-21';
$originTimezone = 'America/New_York';
$date = new DateTime($dateString, new DateTimeZone($originTimezone));
$offset = $date->getOffset();
$utc = new DateTime($dateString, new DateTimeZone('UTC'));
$interval = new DateInterval(sprintf('PT%sS', abs($offset)));
@jrodriguez-ifuelinteractive
jrodriguez-ifuelinteractive / tls.php
Created June 26, 2018 14:12
TLS Version Checker
<?php
$ch = curl_init('https://www.howsmyssl.com/a/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$json = json_decode($data);
echo "Connection uses " . $json->tls_version ."\n";
@jrodriguez-ifuelinteractive
jrodriguez-ifuelinteractive / setup.sh
Created January 17, 2017 13:17
Ubuntu 1.14.x Lamp Stack Config
#!/bin/bash
sudo apt-get -qq update
sudo apt-get install -y python-software-properties
sudo apt-get install -y build-essential
sudo apt-get install -y zip
sudo apt-get install -y apache2
sudo apt-get install -y curl
#MySQL

JS Regex

/src=["|'](.*\.js)[\"|\']/gi

CSS Regex

/href=["|'](.*\.css)[\"|\']/gi
override func viewDidLoad()
{
...
self.automaticallyAdjustsScrollViewInsets = true
...
}
@interface NSString (MD5)
- (NSString *)MD5String;
@end
http://kvz.io/blog/2013/01/16/vagrant-tip-keep-virtualbox-guest-additions-in-sync/
+ vagrant plugin install vagrant-vbguest - In same directory of Vagrantfile
+ sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions - If mount fails