I hereby claim:
- I am arturoleon on github.
- I am arturoleon (https://keybase.io/arturoleon) on keybase.
- I have a public key ASCL9p60WKHjon-YrkXcNh1WnVr_pJtVh4FD8tNb8RRn5Qo
To claim this, I am signing this object:
[Unit] | |
Description=supervisord - Supervisor process control system for UNIX | |
Documentation=http://supervisord.org | |
After=network.target | |
[Service] | |
Type=forking | |
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf | |
ExecReload=/bin/supervisorctl reload | |
ExecStop=/bin/supervisorctl shutdown |
I hereby claim:
To claim this, I am signing this object:
import MySQLdb | |
import sshtunnel | |
with sshtunnel.SSHTunnelForwarder( | |
("remote_ip", 22), | |
ssh_username="centos", | |
ssh_pkey="~/.ssh/id_rsa", | |
remote_bind_address=("mysql_host", 3306), | |
) as tunnel: | |
connection = MySQLdb.connect( |
-- Los códigos de estado corresponden al estándar ISO 3166-2:MX | |
-- Deberás cambiar el nombre de la tabla si estás utilizando un prefijo | |
INSERT INTO `directory_country_region` (`country_id`, `code` , `default_name`) | |
VALUES | |
('MX', 'AGU', 'Aguascalientes'), | |
('MX', 'BCN', 'Baja California'), | |
('MX', 'BCS', 'Baja California Sur'), | |
('MX', 'CAM', 'Campeche'), | |
('MX', 'CHP', 'Chiapas'), | |
('MX', 'CHH', 'Chihuahua'), |
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<style name="Theme.NuevoTema" parent="Theme.AppCompat"> | |
<item name="colorPrimary">#1565C0</item> | |
<item name="colorPrimaryDark">#0D47A1</item> | |
<item name="colorAccent">#FF80AB</item> | |
<item name="colorControlNormal">#757575</item> | |
<item name="colorControlActivated">#FF6E40</item> | |
<item name="colorControlHighlight">#FF4081</item> | |
<item name="colorSwitchThumbNormal">#BDBDBD</item> |
$countries = array( | |
'AF' => 'AFG', | |
'AX' => 'ALA', | |
'AL' => 'ALB', | |
'DZ' => 'DZA', | |
'AS' => 'ASM', | |
'AD' => 'AND', | |
'AO' => 'AGO', | |
'AI' => 'AIA', | |
'AQ' => 'ATA', |
// Para compatibilidad con Android en modo automático | |
Ti.Geolocation.setAccuracy(Ti.Geolocation.ACCURACY_HIGH); | |
// Obtener ubicación por única vez | |
Ti.Geolocation.getCurrentPosition(function(e){ | |
alert("obteniendo por única vez: "+ | |
e.coords.latitude+","+e.coords.longitude); | |
}); | |
// Obtener ubicación cada que cambie |
Ti.Geolocation.getCurrentPosition(function(e){ | |
if(e.success){ | |
// Actualizamos etiqueta | |
$.ubicacion.setText(e.coords.longitude + ", " + e.coords.latitude); | |
var coordenadas = [e.coords.longitude, e.coords.latitude]; | |
// Actualizamos perfil de usuario | |
Cloud.Users.update({ | |
custom_fields: { | |
coordinates: coordenadas |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'aws-sdk' | |
class S3FolderUpload | |
attr_reader :folder_path, :total_files, :s3_bucket | |
attr_accessor :files |
var xhr = Titanium.Network.createHTTPClient(); | |
xhr.open('GET', "http://www.notisistema.com/noticias/feed/"); | |
xhr.onload = function(e) { | |
var xml = this.responseXML; | |
if (xml === null || xml.documentElement === null) { | |
alert('Error. Respuesta vacia'); | |
return; | |
} | |
var items = xml.documentElement.getElementsByTagName('item'); | |
for (var i = 0; i < items.length; i++) { |