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
/*! | |
* Makes sure the log object is available while the program is running | |
*/ | |
class network_logger | |
{ | |
public: | |
network_logger() | |
{ | |
NNetwork::SetLogger(&m_logger); | |
} |
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
# | |
# Parses and argument from the command line | |
# the format must be arg <value> | |
#Ex: | |
# parse_arg result "-ip" "$@" | |
# [[ $? -eq 0 ]] && echo "IP: $result" || echo "Param -ip not found" | |
# parse_arg result "-m" "$@" | |
# [[ $? -eq 0 ]] && echo "MSG: $result" || echo "Param -m not found" | |
# where your command line arguments could be: -ip 127.0.0.1 -m "Hello Mr. Sapiens" | |
# |
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
struct rlimit rl; | |
memset(&rl, 0, sizeof(rl)); | |
rl.rlim_cur = RLIM_INFINITY; | |
rl.rlim_max = RLIM_INFINITY; | |
if (setrlimit(RLIMIT_CORE, &rl)) { | |
fprintf(stderr, "Unable to disable core size resource limit: %s\n", strerror(errno)); | |
} |
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
extfrom=$1 | |
extto=$2 | |
for i in *.$extfrom; do | |
mv $i ${i%%.$extfrom}.$extto; | |
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
# | |
# itera sobre los archivoss de una carpeta | |
# se fija si el archivo arranca con un numero | |
# si arranca con un numero se lo quita | |
# usado para quitar los duplicados de los UK Top 40 | |
# lo que hago es mover todos a una unica carpeta, sin lo numeros porque, por lo general, estan en distinta posicion de semana a semana | |
# |
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
#!/bin/bash | |
#Z:\bin\bash $HOME/Dropbox/linux/wine2unix.sh kate "%1" | |
exec=$1; | |
[[ -n "$2" ]] && path=`winepath -u "$2"`; | |
[[ -n "$3" ]] && path2=`winepath -u "$3"`; |
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
#!/bin/bash | |
# should run as root | |
./bootstrap.sh | |
./b2 --show-libraries | |
./b2 --build-type=complete \ | |
--layout=versioned \ |
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
/*! | |
* \file logger.h | |
* \author ichramm | |
*/ | |
#ifndef logger_h__ | |
#define logger_h__ | |
#define inconcert_log_debug(fmt, ...) if(logger::is_level_enabled(logger::LevelDebug)) \ | |
inconcert_log(logger::LevelDebug, "%s:%d %s - " fmt, logger::get_filename_part(__FILE__), __LINE__, __FUNCTION__ , ## __VA_ARGS__) |
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
#!/bin/bash | |
# | |
# Smart builder for inConcert... ... ... ... | |
# | |
set -e | |
function info() | |
{ |
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
struct CRedisDriver::scoped_connection | |
{ | |
scoped_connection(CppRedis::Pool& pool) | |
: _pool(pool) | |
, _connection(_pool.GetConnection()) | |
{ | |
} | |
~scoped_connection() | |
{ |
OlderNewer