Skip to content

Instantly share code, notes, and snippets.

Avatar

Ivan Pedrazas ipedrazas

View GitHub Profile
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:
@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:
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']
View gist:9350b51c58d494ac21ea
/* 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) {
View gist:4543e8204027ca048650
-> % 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 Jun 3, 2014
Set Wacom Linux with Dual Monitor
View gist:82f2b3fbb87b6c9f8f0e
xsetwacom set "Wacom BambooPT 2FG Small Pen stylus" MapToOutput HDMI1
View gist:7bd34f6efe5f485b0300
<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:3cf8eb6ae8e77c7c97a5
Created Aug 22, 2014
IRSSI: IGNORE JOINS, PARTS, QUITS AND NICKS MESSAGES
View gist:3cf8eb6ae8e77c7c97a5
/ignore -channels #channel * JOINS PARTS QUITS NICKS
@ipedrazas
ipedrazas / gist:b20d1791b272ccc8a0a6
Created Sep 30, 2014
ubuntu pasting between vim and the rest of the world
View gist:b20d1791b272ccc8a0a6
sudo apt-get install vim-athena
"+yy > copy
"+p < paste
# finally
@ipedrazas
ipedrazas / gist:4370dc4c1e0cac2f4643
Created Feb 6, 2015
Raid 0 in EC2 with Ephemeral Disks
View gist:4370dc4c1e0cac2f4643
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
You can’t perform that action at this time.