This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tail -n +2 CONSO.txt | split -l 20000000 - split_ | |
for file in split_* | |
do | |
head -n 1 CONSO.txt > tmp_file | |
cat $file >> tmp_file | |
mv -f tmp_file $file | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php | |
<?php | |
while(true) { | |
sleep(5); | |
echo 'aufgewacht' . PHP_EOL; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xray = require('x-ray'); | |
var phantom = require('x-ray-phantom'); | |
var URL = 'http://www.yad2.co.il/Nadlan/rent.php?City=%D7%99%D7%A8%D7%95%D7%A9%D7%9C%D7%99%D7%9D&Neighborhood=&HomeTypeID=11&fromRooms=1&untilRooms=&fromPrice=200&untilPrice=&PriceType=1&FromFloor=&ToFloor=&EnterDate=&Info='; | |
xray(URL) | |
.use(phantom()) | |
.select([{ | |
$root: 'body', | |
tds: ['td'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HTTP a http://www.cnsf.gob.mx/Eventos/Paginas/Premios_2015.aspx | |
// Si el header de respuesta es distinto de 200, ignorar | |
// Si es 200 enviar mail | |
var nodemailer = require('nodemailer'); | |
var smtpTransport = require('nodemailer-smtp-transport'); | |
var request = require('request'); | |
var URL = 'http://www.cnsf.gob.mx/Eventos/Paginas/Premios_2015.aspx'; | |
var USER = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Source: https://github.com/chovy/node-startup/blob/master/init.d/node-app | |
# author: Anthony Ettinger (chovy) | |
NODE_ENV="development" | |
PORT="3000" | |
APP_DIR="~/scripts-startup" | |
NODE_APP="cnsf.js" | |
CONFIG_DIR="$APP_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
for i in *.m4a; do avconv -i "$i" "${i/.m4a/.mp3}"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var casper = require('casper').create(); | |
var fs = require('fs'); | |
casper.start('https://soundcloud.com/vlad-gonta/sets/new-1', function() { | |
this.viewport(768, 10000); | |
}).then(function () { | |
this.scrollToBottom(); | |
this.wait(1000); | |
}).then(function () { | |
this.scrollToBottom(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "alias cls='clear'" >> ~/.bash_aliases && source ~/.bash_aliases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://nicolascadou.com/blog/2014/01/printing-actual-sqlalchemy-queries/ | |
from sqlalchemy.dialects import mysql; print str(query.statement.compile(dialect=mysql.dialect())) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
import hashlib | |
import os | |
def get_checksum(f): | |
md5 = hashlib.md5() | |
md5.update(open(f).read()) | |
return md5.hexdigest() |
OlderNewer