This file contains hidden or 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/perl | |
################## | |
## CSV Format ## | |
## Delimiter ; ## | |
################## | |
###################################################### | |
### ### | |
### name;ip_contador ### | |
### ### | |
###################################################### |
This file contains hidden or 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/env perl | |
# with a "grep" in terminal you can search words in a excel | |
use strict; | |
use warnings; | |
use Text::Iconv; | |
my $converter = Text::Iconv -> new ("utf-8", "windows-1251"); | |
# Text::Iconv is not really required. | |
# This can be any object with the convert method. Or nothing. |
This file contains hidden or 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
/* numcpu.c code is a part of FFMPEG source (libavutil/) ;) | |
You can play with the definitions in compilation time. Very interesting. | |
[root@host:~# grep -c processor /proc/cpuinfo | |
24 | |
[root@build /]# grep -c processor /proc/cpuinfo | |
1 | |
We have one openvz container with 1 CPU in one server with 24 cpus (cores: 2x cpu 6xcore 2x ht): |
This file contains hidden or 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
# You need macports installed. | |
# This is the magic command line: | |
port install gnuradio +full configure.compiler=gcc |
This file contains hidden or 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
server { | |
server_name dokuwiki.domain.com; | |
root /var/www/dokuwiki; | |
location / { | |
index doku.php; | |
try_files $uri $uri/ @dokuwiki; | |
} | |
location ^~ /conf/ { return 403; } |
This file contains hidden or 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
#This is a bullshit but... i will kill all the sleep connections which sleeping time starting with 8 | |
for a in `echo "show processlist" |mysql --user=root --password=tete coredb |egrep 'Sleep[[:space:]]+8[[:digit:]]+' |awk '{ print $1 }'`; do echo "KILL $a" | mysql --user=root --password=tete coredb; done |
This file contains hidden or 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
# MacOS X 10.7.x | |
# You need opencv is installed (macports) | |
g++ -ggdb `pkg-config --cflags opencv` `pkg-config --libs opencv` header.cpp header2.cpp program.cpp -o program | |
This file contains hidden or 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
mysqladmin ext -ri 1 |grep -i -e queries -e \- |
This file contains hidden or 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
Name: demoproject | |
Version: 0.1 | |
Release: 1%{?dist} | |
Summary: Demo script for doing something cool | |
Group: DemoGroup | |
License: GPL | |
Source0: demoproject-0.1.tar.gz | |
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |
This file contains hidden or 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
MINT 13 AND UBUNTU 12.04 CANON IR C2880-C3380 (UFR2) HOW TO | |
-------------------------------------------------------------- | |
Download drivers for Linux from Canon | |
unzip Linux_UFRII_PrinterDriver_V250_uk_EN.tar.gz | |
cd Linux_UFRII_PrinterDriver_V250_uk_EN/64-bit_Driver/RPM/ | |
alien --to-deb --scripts cndrvcups-common-2.50-1.x86_64.rpm | |
alien --to-deb --scripts cndrvcups-ufr2-uk-2.50-1.x86_64.rpm | |
apt-get install libc6-i386 ia32-libs lib32z1 | |
dpkg -i cndrvcups-common_2.50-2_amd64.deb cndrvcups-ufr2-uk_2.50-2_amd64.deb |