Skip to content

Instantly share code, notes, and snippets.

Avatar

Ivan Pedrazas ipedrazas

View GitHub Profile
@ipedrazas
ipedrazas / gist:2550426
Created Apr 29, 2012
Nginx Server config
View gist:2550426
server {
listen 80 default;
root /var/www/blibb/php/public;
index index.php;
location /user/ {
try_files $uri $uri/ /main.php?id=$uri&$args;
}
@ipedrazas
ipedrazas / gist:2657460
Created May 11, 2012
Nice Paste on Vim
View gist:2657460
:set nosmartindent
:set noautoindent
i
<cmd>-v
<esc>
:set smartindent
:set autoindent
@ipedrazas
ipedrazas / new_gist_file
Created May 30, 2013
Ubuntu Gnome initial SetUp
View new_gist_file
#!/bin/bash
# apt-fast
printf "\n\ninstalling apt-fast repository\n"
sudo add-apt-repository -y ppa:apt-fast/stable
# tweaking tools
################
# ubuntu-tweak
@ipedrazas
ipedrazas / new_gist_file
Created Jun 16, 2013
Ansible to setup Vagrant
View new_gist_file
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.network :forwarded_port, guest: 80, host: 8080
config.vm.network :private_network, ip: "192.168.111.222"
@ipedrazas
ipedrazas / new_gist_file
Created Jun 19, 2013
Maven Settings.xml
View new_gist_file
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>clinker</id>
View gist:6903547
'use strict';
function log(entry){
if( console && console.log ) {
console.log(entry);
}
}
@ipedrazas
ipedrazas / gist:8154292
Created Dec 28, 2013
Little script that extracts title, description and screenshot of the URL based on https://gist.github.com/juanriaza/8144461 by @juanriaza
View gist:8154292
# -*- coding: utf-8 -*-
import os
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
from pyvirtualdisplay import Display
# We use PyVirtualDisplay (a Python wrapper for Xvfb)
# to run headless WebDriver tests.
View gist:9503817
### Keybase proof
I hereby claim:
* I am ipedrazas on github.
* I am iv (https://keybase.io/iv) on keybase.
* I have a public key whose fingerprint is CF64 C5D1 AEA0 4B09 07C3 6C10 3669 7054 1D4F 3A80
To claim this, I am signing this object:
View gist:07d4771ef611257289a8
# run.py
from eve import Eve
import pdb
from worker import populate_dotmark
def after_insert(resource, items):
print "after insert"
for item in items:
url = item['url']
@ipedrazas
ipedrazas / run.py
Created May 1, 2014
flask + celery
View run.py
from eve import Eve
import pdb
from worker import populate_dotmark
def after_insert(resource, items):
print "after insert"
for item in items:
You can’t perform that action at this time.