nc -zv -w 5 127.0.0.1 22
range:
nc -zv 127.0.0.1 22-23
This file contains 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
#Migrate i-mscp to a new server | |
#the new imscp is already installed and does have a different IP than the old one | |
#1. Dump the DB and copy the i-MSCP backup to new server: | |
rsync -rave "ssh -l root" /var/www/imscp/backups 10.0.0.3:/var/tmp/imscp_old_backups | |
#2.Install the old config DB | |
#3. Copy all customer data: | |
rsync -rave "ssh -l root " /var/www/virtual/ 10.0.0.3:/var/www/virtual |
This file contains 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 UTF8 | |
set -g utf8 | |
set-window-option -g utf8 on | |
set-option -g status-utf8 on | |
#display things in 256 colors | |
set -g default-terminal "screen-256color" | |
#scrollback history to 10000 lines | |
set -g history-limit 10000 |
This file contains 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
#nice log output | |
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative" | |
#enable color | |
git config --global color.ui true |
This file contains 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
find /var/lib/graphite/whisper -type f -name "*.wsp" -exec whisper-resize {} 10s:1d 1m:7d 5m:30d 15m:3y \; | |
This file contains 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/ruby | |
require 'open-uri' | |
require 'nokogiri' | |
require 'uri' | |
require 'pushover' | |
require 'google_url_shortener' | |
#not really needed | |
Google::UrlShortener::Base.api_key = "API_KEY" #your google url shortener api |
This file contains 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
[color] | |
ui = true | |
[alias] | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative | |
st = status | |
co = checkout | |
reload = !git fetch --all && git checkout master && git reset --hard origin/master && git submodule update --init | |
rev = push origin HEAD:refs/for/master |
This file contains 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
# Not so perfect collectd generic jmx plugin config for kafka mirrormaker | |
# You need to enable JMX for mirrormaker first. | |
# Documentation: | |
# https://collectd.org/wiki/index.php/Plugin:Java | |
<Plugin java> | |
<Plugin "GenericJMX"> | |
<MBean "classes"> | |
ObjectName "java.lang:type=ClassLoading" |
This file contains 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
void loop() | |
{ | |
static uint32_t lastmin=65536; | |
static uint32_t myfree; | |
static uint16_t mymax; | |
static uint8_t myfrag; | |
ESP.getHeapStats(&myfree, &mymax, &myfrag); | |
Serial.printf("(%d) -> free: %5d - max: %5d - frag: %3d%% <- \n", millis(), myfree, mymax, myfrag); |
OlderNewer