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
@avances123
avances123 / getip.sh
Created May 29, 2011 16:22
Scripts para lanzar un tunel ipsec
#!/bin/bash
/sbin/ifconfig $1 | grep "P-t-P" | gawk -F: '{print $2}' | gawk '{print $1}'
@avances123
avances123 / syslog
Created June 8, 2011 10:43
Fallos skge
Jun 7 22:11:13 xaloc kernel: swapper: page allocation failure. order:0, mode:0x4020
Jun 7 22:11:13 xaloc kernel: Pid: 0, comm: swapper Not tainted 2.6.33.7-2010-10-19 #2
Jun 7 22:11:13 xaloc kernel: Call Trace:
Jun 7 22:11:13 xaloc kernel: <IRQ> [<ffffffff81074079>] ? __alloc_pages_nodemask+0x4fc/0x52c
Jun 7 22:11:13 xaloc kernel: [<ffffffff810994af>] ? new_slab+0xad/0x25b
Jun 7 22:11:13 xaloc kernel: [<ffffffff8109a136>] ? __slab_alloc+0x1c6/0x3e4
Jun 7 22:11:13 xaloc kernel: [<ffffffff8131752e>] ? __netdev_alloc_skb+0x29/0x43
Jun 7 22:11:13 xaloc kernel: [<ffffffff8131752e>] ? __netdev_alloc_skb+0x29/0x43
Jun 7 22:11:13 xaloc kernel: [<ffffffff8109aec4>] ? __kmalloc_node_track_caller+0x9d/0xd9
Jun 7 22:11:13 xaloc kernel: [<ffffffff81317416>] ? __alloc_skb+0x63/0x152
@avances123
avances123 / servicios_fa.pl
Created August 23, 2011 12:54
servicios en windows
#!/usr/bin/perl
use strict;
use DateTime;
use Getopt::Long;
use Eolica;
use Win32::Service qw/StartService StopService GetStatus PauseService ResumeService GetServices/;
use Data::Dumper;
@avances123
avances123 / regedit
Created August 25, 2011 10:56
claves cambiadas para el samba en el regedit
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache set to 1
HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size set to 3
HKLM\System\CCS\Services\Netlogon\Parameters
DWORD RequireSignOrSeal = 1
DWORD RequireStrongKey = 1
@avances123
avances123 / killapache.pl
Created August 29, 2011 08:17
Exploit para tumbar apaches
#Apache httpd Remote Denial of Service (memory exhaustion)
#By Kingcope
#Year 2011
#
# Will result in swapping memory to filesystem on the remote side
# plus killing of processes when running out of swap space.
# Remote System becomes unstable.
#
use IO::Socket;
@avances123
avances123 / error.log
Created September 23, 2011 23:52
raster numpy error
$ /usr/lib/postgresql/9.1/bin/raster2pgsql.py -r g100_00.tif -t corine-g100_00-v15 -s 3035 -b 1
BEGIN;
CREATE TABLE "public"."corine-g100_00-v15" (rid serial PRIMARY KEY);
SELECT AddRasterColumn('public','corine-g100_00-v15','rast',3035, ARRAY['8BUI'], false, false, ARRAY[0.0], 100.000000000000000, -100.000000000000000, null, null, null);
Traceback (most recent call last):
File "/usr/lib/postgresql/9.1/bin/raster2pgsql.py", line 1040, in <module>
main()
File "/usr/lib/postgresql/9.1/bin/raster2pgsql.py", line 1003, in main
gt = wkblify_raster(opts, filename.replace( '\\', '/') , i, gt)
File "/usr/lib/postgresql/9.1/bin/raster2pgsql.py", line 945, in wkblify_raster
@avances123
avances123 / script.sh
Created October 15, 2011 12:48
Primer script de marcos
#!/bin/bash
sleep 15
/usr/bin/compiz --replace ccp --indirect-rendering
@avances123
avances123 / syslog
Created February 23, 2012 19:55
Caida de tunel ppp
Feb 23 20:44:45 fa-casa pppd[7629]: sent [LCP EchoReq id=0x24 magic=0xe89df24d]
Feb 23 20:44:45 fa-casa pppd[7629]: rcvd [LCP EchoRep id=0x24 magic=0x0]
Feb 23 20:45:15 fa-casa pppd[7629]: sent [LCP EchoReq id=0x25 magic=0xe89df24d]
Feb 23 20:45:45 fa-casa pppd[7629]: sent [LCP EchoReq id=0x26 magic=0xe89df24d]
Feb 23 20:45:49 fa-casa xl2tpd[1617]: Maximum retries exceeded for tunnel 10630. Closing.
Feb 23 20:46:15 fa-casa pppd[7629]: sent [LCP EchoReq id=0x27 magic=0xe89df24d]
Feb 23 20:46:15 fa-casa pppd[7629]: Modem hangup
Feb 23 20:46:15 fa-casa xl2tpd[1617]: Terminating pppd: sending TERM signal to pid 7629
Feb 23 20:46:15 fa-casa xl2tpd[1617]: Connection 46588 closed to 80.38.103.224, port 1701 (Timeout)
Feb 23 20:46:15 fa-casa pppd[7629]: Connect time 19.5 minutes.
@avances123
avances123 / crontab
Created February 23, 2012 20:24
CPU Temp log
# m h dom mon dow command
*/1 * * * * sensors | grep Core | ts >> /home/fabio/temp.log
@avances123
avances123 / gist:1904004
Created February 24, 2012 21:51
atiende
tc qdisc add dev br0 root handle 1: cbq \
avpkt 1000 bandwidth 2mbit
tc class add dev br0 parent 1: classid 1:1 cbq \
rate 700kbit allot 1500 prio 5 bounded isolated
tc filter add dev br0 parent 1: protocol ip \
prio 16 u32 match ip dst 192.168.1.133 flowid 1:1
tc filter add dev br0 parent 1: protocol ip \