Skip to content

Instantly share code, notes, and snippets.

#/bin/bash
# From a base path get the class version for all the class files
#To extract all the class files from the jars
#find ./ -name "*.jar" -exec jar -xf {} \;
BASE=$1
for FILE in $(find "$BASE" -iname "*.class") ; do
#file $FILE # Only compiler version
echo -e "$FILE: "
javap -verbose $FILE | grep version | grep version | tr '\n' ' ' # Compiler version and minimum version
email:
host: server.example.com:465
user: user@example.com
pass: pass
desti: desti@example.com
#!/bin/bash
#############################
# check_sftp-file.sh script #
#############################
# Author : Vittorio Memmo
# Ver.1.0.0 - Mar 2012
# Author : aseques
# Ver.1.0.1 - Oct 2017
#############################
#
{
"from": 0,
"size": 150,
"query": {
"bool": {
"must": {
"query_string": {
"query": "gl2_source_input:56d82de1f8fe7e034a8da1be levelname:WARN",
"allow_leading_wildcard": true
}
@aseques
aseques / gist:28fb6b3d4a160ebf43cb
Created August 4, 2014 10:01
Errors on zenoss modeler
2014-08-04 09:27:06,713 ERROR zen.ZenModeler: Problem loading plugin ZenPacks.zenoss.Microsoft.Windows.modeler.plugins.zenoss.winrm.OperatingSys
tem
2014-08-04 09:27:06,714 ERROR zen.ZenModeler: ['Traceback (most recent call last):', ' File "/opt/zenoss/Products/DataCollector/Plugins.py", li
ne 100, in create', ' self.modPath)', ' File "/opt/zenoss/Products/DataCollector/Plugins.py", line 192, in importPlugin', ' return import
Class(modPath)', ' File "/opt/zenoss/Products/ZenUtils/Utils.py", line 429, in importClass', ' raise ex', 'ImportError: No module named mode
ler.plugins.zenoss.winrm.OperatingSystem']
2014-08-04 09:27:06,721 ERROR zen.ZenModeler: Due to import errors, removing the ZenPacks.zenoss.Microsoft.Windows.modeler.plugins.zenoss.winrm.
OperatingSystem plugin from this collection cycle.
2014-08-04 09:27:06,721 ERROR zen.ZenModeler: Problem loading plugin ZenPacks.zenoss.Microsoft.Windows.modeler.plugins.zenoss.winrm.CPUs
2014-08-04 09:27:06,722 ERROR zen.ZenModeler: ['Traceback (most
@aseques
aseques / gist:8912310
Last active February 11, 2022 14:54
Instructions to build pmacct trunk with pfring
#Predepends
apt-get install libnuma-dev
#Download pf_ring
#http://sourceforge.net/projects/ntop/files/PF_RING/
#--Version 5.6.1--
#wget http://freefr.dl.sourceforge.net/project/ntop/PF_RING/PF_RING-5.6.1.tar.gz
#tar -xzf PF_RING-5.6.1.tar.gz
#cd PF_RING-5.6.1
#--Version 5.6.2--
<?php
/**
* Encode an UTF-8 string into GSM 03.38
* Since UTF-8 is largely ASCII compatible, and GSM 03.38 is somewhat compatible, unnecessary conversions are removed.
* Specials chars such as € can be encoded by using an escape char \x1B in front of a backwards compatible (similar) char.
* UTF-8 chars which doesn't have a GSM 03.38 equivalent is replaced with a question mark.
* UTF-8 continuation bytes (\x08-\xBF) are replaced when encountered in their valid places, but
* any continuation bytes outside of a valid UTF-8 sequence is not processed.
*
@aseques
aseques / gist:5830419
Last active December 18, 2015 19:08
Hook to allow a custom file with extra lines in the /etc/hosts.
#!/usr/bin/perl
=head1 NAME
Plugin::CustomHosts
=cut
# i-MSCP - internet Multi Server Control Panel
# Copyright (C) 2010-2013 by internet Multi Server Control Panel
@aseques
aseques / gist:2662935
Created May 11, 2012 22:52
Marble compilation on x86_64
--- a/CMakeLists.txt 2012-05-12 15:05:14.000000000 +0200
+++ b/CMakeLists.txt 2012-05-12 15:05:21.000000000 +0200
@@ -155,8 +155,9 @@
SET( MACOSX_BUNDLE_VERSION 0.3.0 )
SET( MACOSX_BUNDLE_LONG_VERSION_STRING Version 0.3.0 )
SET( MACOSX_BUNDLE_BUNDLE_NAME Marble)
- #SET( CMAKE_OSX_ARCHITECTURES ppc;i386 ) #Comment out if not universal binary
- SET( CMAKE_OSX_ARCHITECTURES i386 ) #Comment out if universal binary
+ if (MACOSX_UNIVERSAL)
+ SET( CMAKE_OSX_ARCHITECTURES ppc;i386 ) #Comment out if not universal binary
@aseques
aseques / gist:2566985
Created May 1, 2012 10:06
krita patch
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3e9b7b5..d6e2a0b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -156,6 +156,7 @@ macro_ensure_out_of_source_build("Compiling Calligra inside the source directory
find_package(Perl REQUIRED)
find_package(ZLIB REQUIRED)
find_package(PNG REQUIRED)
+include_directories(${PNG_INCLUDE_DIR})
find_package(Boost REQUIRED) # for pigment and stage