Skip to content

Instantly share code, notes, and snippets.

View avances123's full-sized avatar
🏠
Working from home

Fabio Rueda avances123

🏠
Working from home
View GitHub Profile
#!/usr/bin/ruby
# Download NASA MODIS imagery and use it as a desktop background.
# You'll need ImageMagick installed for this to work.
require 'date'
require 'net/http'
# Screen width/height
X = 1366
Y = 768
Test gist for wordpress gist shotcode plugin
#!/bin/bash
# http://rapidfire.sci.gsfc.nasa.gov/subsets/?subset=Spain.2010130.terra.250m.jpg&vectors=fires+coast+borders
HOST="http://rapidfire.sci.gsfc.nasa.gov/subsets/?subset="
CAPA="Spain"
FECHA=$(date +%Y%j)
#FECHA=$(date -d 'yesterday' +%Y%j)
SAT="aqua"
RES="250m"
VECTORS="&vectors=fires+coast+borders"
URL="${HOST}${CAPA}.${FECHA}.${SAT}.${RES}.jpg${VECTORS}"
#!/bin/python
import random
class Individuo:
def moverAContigua(self):
exito=False
while exito==False:
incx = random.choice([-1,0,1])
fabio@ubuntu-desktop:~/openblock$ python bootstrap.py 1>>log.txt 2>>log.txt
New python executable in ./bin/python
Installing distribute..................................................................................................................................................................................done.
Searching for virtualenv>=1.4.9
Best match: virtualenv 1.5.1
Processing virtualenv-1.5.1-py2.6.egg
virtualenv 1.5.1 is already the active version in easy-install.pth
Installing virtualenv script to /home/fabio/openblock/bin
Using /home/fabio/openblock/lib/python2.6/site-packages/virtualenv-1.5.1-py2.6.egg
@avances123
avances123 / mkfs.xfs
Created October 22, 2010 11:04
con un stripe size de la LSI a 1mb, el lvm default y el xfs en default
[root@gregal iberdrolausa]# mkfs.xfs /dev/test/lvtest
Warning - device mapper device, but no dmsetup(8) found
meta-data=/dev/test/lvtest isize=256 agcount=4, agsize=244121344 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=976485376, imaxpct=5
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal log bsize=4096 blocks=476799, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
@avances123
avances123 / encuesta
Created November 12, 2010 22:17
codigo embebido
<iframe width="300" height="250" frameborder="0" src="http://www.doodle.com/summary.html?pollId=w7he3tuzby7tcfxw"> </iframe>
@avances123
avances123 / unison.sh
Created November 18, 2010 20:46
sync con unison
#!/bin/bash
# set paths / dirs
_paths="/home/fabio/musica"
# binary file name
_unison=/usr/bin/unison
# server names
# sync server1.cyberciti.com with rest of the server in cluster
_rserver="fa-work"
fabio@fa-casa:~$ nikto -host http://www.enricdurany.com/
- Nikto v2.1.1
---------------------------------------------------------------------------
+ Target IP: 174.132.193.186
+ Target Hostname: www.enricdurany.com
+ Target Port: 80
+ Start Time: 2010-11-24 13:14:48
---------------------------------------------------------------------------
+ Server: Apache mod_fcgid/2.3.5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635
+ robots.txt contains 2 entries which should be manually viewed.
@avances123
avances123 / getopt.pl
Created November 30, 2010 15:55
This is a simplified example for cut and paste use for command line parsing arguments with the use of an options hash
#!/usr/bin/perl -w
##Simplified example of using Getopt:Long moudule with an Options hash
use Getopt::Long;
use strict;
my %Opt=();