Skip to content

Instantly share code, notes, and snippets.

View colorwebdesigner's full-sized avatar

Ivan Pro colorwebdesigner

View GitHub Profile
@colorwebdesigner
colorwebdesigner / issue
Last active June 27, 2020 15:36
Sample content of `/etc/issue` file for Debian based systems
============================================================
Welcome to \n.\o server, stranger!
I see that you are trying to log on \l at \t,
so i make note about it in my log file and report my master.
Big brother already watching you.
------------------------------------------------------------
I'm based on Debian GNU/\s \r, so be jentle,
like other \U inside.
============================================================
@colorwebdesigner
colorwebdesigner / http_dowload.sh
Last active June 17, 2020 20:33
check curl or wget is install and dowload with progress bar
#!/bin/bash
# ============================
# Found in install.sh from dnote
# https://github.com/dnote/dnote/blob/master/install.sh
# ============================
http_download() {
dest=$1
srcURL=$2
if is_command curl; then
@colorwebdesigner
colorwebdesigner / mikrotik.setNtpServers.sh
Last active November 24, 2022 18:27
Mikrotik script (.sh only for syntax highlighting)
# ==============================
# setNtpServers
# ==============================
# Mikrotik RB951G-2HnD
# RouterOS v6.46.4 (stable)
# ---
# Corrects IP addresses of NTP servers in
# System -> NTP Client (if they have changed),
# resolve IPs by NTP domains and send message
# to Slack.
@colorwebdesigner
colorwebdesigner / mikrotikAutoConfig.rsc
Created February 29, 2020 12:20
Mikrotik configuration script
{
# Encoding must be UTF-8!
#-------------------------------------------------------------------------------
# Set the name of the router and its SSID
:local systemName ""
# Set the password you would like to use when logging on as 'admin'.
:local adminPassword ""
@colorwebdesigner
colorwebdesigner / slackIPChangeInfo.rsc
Last active May 23, 2020 10:36
Mikrotik script for send message to Slack on IP change
:global ipCurrent "$ipCurrent";
{
# Change to your settings
# -----------------------
:local wanInterface "eth1";
:local slackHookUrl "https://hooks.slack.com/services/YOUR/APP/SECRET";
# -----------------------
:local ipNew [/ip address get [find interface=$wanInterface] address];
@colorwebdesigner
colorwebdesigner / catch-arguments.sh
Last active July 26, 2019 03:10
Catch and processing script arguments
# Function to print help message and exit
usage () {
[ ! -z "$1" ] && printf "\n \e[31m[ error ]\e[0m $0: %s\n" "$1" >&2
printf "$USAGE" >&2
exit 2
}
# Catch arguments
for (( i=1; i<=$#; i++ )); do
case "${!i}" in
@colorwebdesigner
colorwebdesigner / reset.css
Last active May 18, 2019 16:57
Combination of normalize.css v8.0.1 + reset.css
/*!
--------------------------------
normalize.css v8.0.1 + reset.css
--------------------------------
*/
html {
line-height: 1.15;
-webkit-text-size-adjust: 100%;
}
body, html {
@colorwebdesigner
colorwebdesigner / svgConnect.jquery.js
Created April 30, 2019 12:36
Connect objects with svg line
'use strict';
/**
* svgConnect
* Connect objects with svg line
*
* @options
*
*/
(function($) {
@colorwebdesigner
colorwebdesigner / informer.jquery.js
Created April 30, 2019 11:52
Lightweight message system for jquery
'use strict';
/**
* Informer
* Lightweight message system
*
* @options
*
* type -
* life -
* speed -