Skip to content

Instantly share code, notes, and snippets.

View panchicore's full-sized avatar
👽

Luis Pallares panchicore

👽
View GitHub Profile
@panchicore
panchicore / nginx.conf
Created May 3, 2013 20:27
deploy a wordpress into a subfolder where the domain context is a django project. use /blog/ context path.
# wordpress files must live here:
# /home/ubuntu/www/blog.xxx.com/wordpress/blog/
server {
.....
root /home/ubuntu/www/blog.xxx.com/wordpress;
location /blog/ {
index index.php;
p {
line-height: 1em;
max-height: 2em;
overflow: hidden;
width: 10em;
background: yellow;
}
<p>Here is a paragraph of town lines.... ellipsis does not work here</p>
@panchicore
panchicore / 1. setup nginx.txt
Last active September 27, 2021 03:47
Use NGINX as webserver to deploy apps with python
# install NGINX requirements
sudo apt-get install libpcre3-dev build-essential libssl-dev
# install NGINX
cd
mkdir src
cd src
wget http://nginx.org/download/nginx-1.4.5.tar.gz
tar xvf nginx-1.4.5.tar.gz
cd nginx-1.4.5
@panchicore
panchicore / items.json
Last active December 29, 2022 08:37
top 40 songs in the world
[
{
"artist": "Pharrell Williams",
"link": "http://top40-charts.com/song.php?sid=36547",
"name": "Happy",
"youtube_id": "Q-GLuydiMe4"
},
{
"artist": "Katy Perry",
"link": "http://top40-charts.com/song.php?sid=36874",
<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 {
@panchicore
panchicore / olx.cars.barranquilla.py
Last active February 23, 2017 00:23
scrap OLX cars from barranquilla and make a notifier to car dealers
from bs4 import BeautifulSoup
import re, requests
headers = {'Accept': '*/*',
'Accept-Encoding': 'gzip, deflate',
'Accept-Language': 'es-ES,es;q=0.8,en;q=0.6',
'Connection': 'keep-alive',
'Content-Type': 'text/html',
'Origin': 'http://olx.com.co',
'Referer': 'http://olx.com.co',