Skip to content

Instantly share code, notes, and snippets.

View panchicore's full-sized avatar
👽

Luis Pallares panchicore

👽
View GitHub Profile
<fecha id="41833" fecha="20140401" fechadesde="20140401"
fechahasta="20140409" nombre="Llave 1" nombrenivel="Cuartos de Final"
nivel="3" orden="1" nombreDia="Martes" fn="1" estado="actual">
<partido id="181965" fecha="20140401" hora="15:45:00"
lugarCiudad="Barcelona" nombreEstadio="Camp Nou" clubEstadio=""
idEstadio="26" nombreDia="Martes" nivelCarga="1"
nivelCobertura="700" ordenAgenda="0" tipo="ida" nro="113" nd=""
idGan="" nomGan="" ptsGan="1">
<estado id="2">Finalizado</estado>
<horaEstado>17:37:43</horaEstado>
<wsdl:definitions targetNamespace="http://ws.allianz.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:ns="http://ws.allianz.com" xmlns:ns1="http://org.apache.axis2/xsd">
<wsdl:documentation>AutosIndividualWS</wsdl:documentation>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://ws.allianz.com">
<xs:element name="AutosIndividualWSException">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="AutosIndividualWSException" nillable="true" type="ns:Exception"/>
</xs:sequence>
</xs:complexType>
@panchicore
panchicore / uswgi_msecs.py
Last active August 29, 2015 14:08
how to know what requests are super slow in your uswgi server
import sys
with open(sys.argv[1]) as f:
content = f.readlines()
for line in content:
parts = line.split("bytes in ")
if len(parts)>1:
msecs = parts[1].split(" msecs ")[0]
import requests
x = requests.get("http://www.zonacero.info/nota-destacada/63048-los-temas-musicales-que-han-hecho-historia-en-el-carnaval-en-barranquilla")
s = x.content
for i in s.split("/images/stories/audio/"):
if i.count(".mp3"):
print "http://www.zonacero.info/images/stories/audio/" + i.split("mp3")[0] + "mp3"
@panchicore
panchicore / Receiver.java
Created February 27, 2015 12:21
Make sure you've gone through the Android Push QuickStart to set up your app to receive pushes. https://www.parse.com/apps/quickstart#parse_push/android/existing
package com.foobar.notification;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.parse.ParseAnalytics;
import com.parse.ParsePushBroadcastReceiver;
public class Receiver extends ParsePushBroadcastReceiver {
http://www.hackerparadise.org/raffle/?ks_giveaway=win-2-years-worth-of-free-coworking-around-the-world&lucky=3034
search expensive urls in a uwsgi server log.
hits between 3 and 99 seconds:
python check.py uwsgi.log 3000 99999
output:
GET /api/1/search?q=E => generated 470381 bytes in 3433 msecs (HTTP/1.0 200) 4 headers in 135 bytes (1 switches on core 0)
GET /api/1/search?q=A => generated 586983 bytes in 4412 msecs (HTTP/1.0 200) 4 headers in 135 bytes (1 switches on core 0)
GET /api/1/search?q=R => generated 457041 bytes in 3653 msecs (HTTP/1.0 200) 4 headers in 135 bytes (1 switches on core 0)
@panchicore
panchicore / countries.json
Last active August 29, 2015 14:23
complete world countries json file (extracted from official geonames database)
[
{
"pk": 1,
"model": "countries.country",
"fields": {
"languages": "ca",
"code3": "AND",
"name": "Andorra",
"capital": "Andorra la Vella",
"country_id": 3041565,
import os
from shutil import copy2, copyfile
origin = "/Users/panchicore/Dropbox (Personal)/PSDs AQHJ 2.0/Android/assets/assets/res"
destination = "/Users/panchicore/AndroidStudioProjects/Aquehorajuega/app/src/main/res"
folders = ["drawable-hdpi", "drawable-mdpi", "drawable-xhdpi", "drawable-xxhdpi"]
filename = raw_input("filename in this dir: ")
for folder in folders:
_from = os.path.join(origin, folder, filename)
_to = os.path.join(destination, folder, filename)
@panchicore
panchicore / ec2.py
Created April 11, 2011 13:33 — forked from ingenieroariel/ec2.py
deploy geonode
# easy_install boto
# You will also need:
# - A .pem keyfile generated using the Amazon web interface to create new instances
# - The secret and access keys created from the
# The only pre-reqs are having created a keypair (.pem file)
# via the amazon web interface and knowing the AWS key and secret
#
# Usage:
# export AWS_ACCESS_KEY_ID='blahblah'
# export AWS_SECRET_ACCESS_KEY='blebleble'