Skip to content

Instantly share code, notes, and snippets.

### 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:
# 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 09:12
flask + celery
from eve import Eve
import pdb
from worker import populate_dotmark
def after_insert(resource, items):
print "after insert"
for item in items:
/* Controllers */
angular.module('dotApp').controller('dotMarkController', ['$scope', 'api', '$routeParams', function ($scope, api, $routeParams) {
$scope.refreshEntries = function(){
api.getDotMarksEntries().success(function (data) {
var elems = new Array();
var etags = new Array();
_.each(data._items, function(item){
elems.push(item);
_.each(item.tags, function(tag) {
@ipedrazas
ipedrazas / gist:4543e8204027ca048650
Last active August 29, 2015 14:01
Eve Patch Validation
-> % curl -H "If-Match: 8c000ac14c61d1810a49418ca8c2147a5310f923" -X PATCH
-d 'views=2' http://dotmarks.dev:5000/dotmarks/5373ae41f3c4d5154270e265
{"_status": "ERR", "_issues": {"views": "must be of integer type"}}
@ipedrazas
ipedrazas / gist:82f2b3fbb87b6c9f8f0e
Created June 3, 2014 22:27
Set Wacom Linux with Dual Monitor
xsetwacom set "Wacom BambooPT 2FG Small Pen stylus" MapToOutput HDMI1
<div class="calculator center">
<form class="form-horizontal" role="form">
<div class="form-group">
<div class="col-xs-6 col-sm-4">
</div>
<div class="col-xs-6 col-sm-4 xrate">
<h1>Megamine Btc-Satoshi Calculator</h1>
</div>
<div class="col-xs-6 col-sm-4">
</div>
@ipedrazas
ipedrazas / gist:b20d1791b272ccc8a0a6
Created September 30, 2014 10:09
ubuntu pasting between vim and the rest of the world
sudo apt-get install vim-athena
"+yy > copy
"+p < paste
# finally
@ipedrazas
ipedrazas / gist:4370dc4c1e0cac2f4643
Created February 6, 2015 10:47
Raid 0 in EC2 with Ephemeral Disks
lsblk
# umount any disk that you want to use in the raid
umount /mnt
sudo apt-get install lvm2
sudo mkdir /mnt/stripe1
sudo vgcreate vg1 /dev/xvdb /dev/xvdc
sudo lvcreate -i 2 -L 300G -n lv1 vg1
sudo mkfs -t ext4 /dev/vg1/lv1
docker run -it -v /etc/localtime:/etc/localtime -v $HOME/.irssi:/home/user/.irssi --read-only --name irssi irssi