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
package it.marcoberri.meteo; | |
import com.influxdb.annotations.Column; | |
import com.influxdb.annotations.Measurement; | |
import com.influxdb.client.InfluxDBClient; | |
import com.influxdb.client.InfluxDBClientFactory; | |
import com.influxdb.client.WriteApi; | |
import com.influxdb.client.domain.WritePrecision; | |
import com.influxdb.client.write.Point; | |
import org.apache.commons.io.IOUtils; |
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
SELECT dbschemas.[name] as 'Schema', | |
dbtables.[name] as 'Table', | |
dbindexes.[name] as 'Index', | |
indexstats.avg_fragmentation_in_percent, | |
indexstats.page_count, | |
'ALTER INDEX ' + dbindexes.[name] + ' ON ' + dbtables.[name] +' REBUILD;' | |
FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) AS indexstats | |
INNER JOIN sys.tables dbtables on dbtables.[object_id] = indexstats.[object_id] | |
INNER JOIN sys.schemas dbschemas on dbtables.[schema_id] = dbschemas.[schema_id] |
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
user nginx; | |
worker_processes auto; | |
error_log /var/log/nginx/error.log; | |
pid /run/nginx.pid; | |
include /usr/share/nginx/modules/*.conf; | |
events { | |
worker_connections 1024; | |
} |
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
/** | |
* | |
* Verifica la presenza di un singolo valore in session storage, | |
* se non esiste esegue la chiamata | |
* | |
* @param {string} url | |
* @returns {*} | |
* @memberof ApiService | |
*/ | |
public getLookUp(url: string): any { |
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
USE [DBNAME] | |
GO | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO | |
SET ANSI_PADDING ON | |
GO |
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
root@kali:/usr/share/wordlists# wpscan --url www.<site>.com --enumerate u | |
_______________________________________________________________ | |
__ _______ _____ | |
\ \ / / __ \ / ____| | |
\ \ /\ / /| |__) | (___ ___ __ _ _ __ | |
\ \/ \/ / | ___/ \___ \ / __|/ _` | '_ \ | |
\ /\ / | | ____) | (__| (_| | | | | | |
\/ \/ |_| |_____/ \___|\__,_|_| |_| | |
WordPress Security Scanner by the WPScan Team |
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
#su una Ubuntu 15.04 server | |
##Install java 8 | |
sudo add-apt-repository ppa:webupd8team/java | |
sudo apt-get update | |
sudo apt-get install oracle-java8-installer | |
sudo apt-get install oracle-java8-set-default | |
##Verificare se è dispinibile la versione 2.4 di apache |
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
function deleteAllCollection(dbName,excludeCollection){ | |
var dbOne = db.getSisterDB(dbName); | |
for(var colName in dbOne.getCollectionNames()){ | |
var collectionName = dbOne.getCollectionNames()[colName]; | |
if(!collectionName || collectionName == "") | |
continue; | |
if(excludeCollection.indexOf(collectionName) > -1) | |
continue; | |
dbOne[collectionName].drop(); |
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
/* | |
la funzioanlità ricerca nel server tutti i db like <db_like_name> e per ogni collecion presente nel singolo db | |
esegue una eliminazione per spurgare i log. | |
per eseguire lo script | |
./mongo --host <indirizzo_host> --port <porta> PurgeLogCollection.js --quiet --eval "var deleteData=false;var beforePurgeDay=200;" | |
parametri in eval | |
deleteDate = true|false (se false visualizza solo questo che dovrà fare senza eliminare default false) |
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
function bytesToSize(bytes, precision) { | |
var kilobyte = 1024; | |
var megabyte = kilobyte * 1024; | |
var gigabyte = megabyte * 1024; | |
var terabyte = gigabyte * 1024; | |
if ((bytes >= 0) && (bytes < kilobyte)) { | |
return bytes + ' B'; | |
} else if ((bytes >= kilobyte) && (bytes < megabyte)) { |
NewerOlder