Skip to content

Instantly share code, notes, and snippets.

@fcenobi
fcenobi / index.html
Created July 9, 2020 21:23 — forked from ralphbean/index.html
Simple vertical tree diagram using v4
<!DOCTYPE html>
<meta charset="utf-8">
<style> /* set the CSS */
.node circle {
fill: #fff;
stroke: steelblue;
stroke-width: 3px;
}
@fcenobi
fcenobi / Winscp para mac.md
Created July 9, 2020 21:02 — forked from anonymous/Winscp para mac.md
Winscp para mac

File: Download Winscp para macfugu mac scp for mac filezilla scp mac winscp for mac 2016 sftp for mac scp client for mac cyberduck scp filezilla for mac   2 May 2017 Transmit is an FTP client for Mac OS X and Mac OS Classic (which is unsupported). It runs on any operating system with Java support (Mac OS X, Windows, Linux, *BSD "Dual pane file manager and SFTP/FTP client for Mac OS X ForkLift is designed to be the fastest, most powerful file 25 Oct 2013 I was looking for a usable alternative for my beloved WinSCP on Mac OSX and found an awesome tool called "Cyberduck". It offers: FTP (File Descubre la mejor alternativa a WinSCP en Softonic. Compara y descarga mas de 13 programas como WinSCP: FileZilla, Cyberduck, Transmit y mas. As we all know Apple software is the best woldwide

@fcenobi
fcenobi / apache-template
Created July 6, 2020 19:26 — forked from lavoiesl/apache-template
Apache VirtualHost Template with variable replacement
<VirtualHost *:80>
ServerAdmin {USER}@cslavoie.com
ServerName {DOMAIN}
ServerAlias www.{DOMAIN}
ServerAlias {USER}.localhost
ServerAlias {USER}.static.cslavoie.com
DocumentRoot {DOC_ROOT}
<Directory {DOC_ROOT}>
@fcenobi
fcenobi / oselab_dns_installer.sh
Created July 6, 2020 04:20 — forked from rafaeltuelho/oselab_dns_installer.sh
Bash script to configure a DNS Server (Bind) to be used in a OSEv3 environment (RHEL 7.1 >)
#!/bin/bash
guid=`hostname|cut -f2 -d-|cut -f1 -d.`
yum -y install bind bind-utils
systemctl enable named
systemctl stop named
### firewalld was being a bit problematic
### Since we turn it off later anyway, I've skipped this step.
#firewall-cmd --permanent --zone=public --add-service=dns
@fcenobi
fcenobi / phpmyadmin
Created July 5, 2020 05:04 — forked from tsolar/phpmyadmin
phpmyadmin nginx config
server {
location /phpmyadmin {
root /usr/share/;
index index.php index.html index.htm;
location ~ ^/phpmyadmin/(.+\.php)$ {
try_files $uri =404;
root /usr/share/;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
@fcenobi
fcenobi / generate-ssh-key.sh
Created July 5, 2020 04:59 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
@fcenobi
fcenobi / aria2.daemon
Created June 27, 2020 01:57 — forked from h0tw1r3/aria2.daemon
Aria2c systemd service
continue
dir=/var/www/downloads
file-allocation=trunc
max-connection-per-server=4
max-concurrent-downloads=2
max-overall-download-limit=0
min-split-size=25M
@fcenobi
fcenobi / gist:56ed025c62f42f86189fefad6bc05883
Created April 6, 2020 08:11 — forked from dbrgn/gist:8243aaaa0a0e47eda094
Mikrotik RouterOS: Block DNS lookups for names containing "samsung"
/ip firewall filter add
chain=input
action=drop
comment="deny DNS resolution containing 'samsung' from SmartTV"
protocol=udp dst-port=53
content="samsung"
src-mac-address=<smartv-mac-addr>
/ip firewall filter add
chain=forward
action=drop
@fcenobi
fcenobi / openvpn_gen.py
Created April 5, 2020 22:48 — forked from Justasic/openvpn_gen.py
This is a python script to generate client OpenVPN configuration files. This is based mostly on the easyrsa script and is much simpler to understand.
import os
import socket
from OpenSSL import crypto, SSL
# OpenVPN is fairly simple since it works on OpenSSL. The OpenVPN server contains
# a root certificate authority that can sign sub-certificates. The certificates
# have very little or no information on who they belong to besides a filename
# and any required information. Everything else is omitted or blank.
# The client certificate and private key are inserted into the .ovpn file
# which contains some settins as well and the entire thing is then ready for
How to add 2 gateways and seperate clients by Chupaka
/ip firewall mangle add chain=prerouting src-address=198.54.15.0/24 action=mark-routing new-routing-mark=r_178
/ip firewall mangle add chain=prerouting src-address=192.168.10.0/24 action=mark-routing new-routing-mark=r_178
/ip firewall mangle add chain=prerouting src-address=192.168.11.0/24 action=mark-routing new-routing-mark=r_172
/ip firewall mangle add chain=prerouting src-address=192.168.12.0/24 action=mark-routing new-routing-mark=r_172
/ip route add gateway=178.242.0.200 routing-mark=r_178
/ip route add gateway=172.16.0.200 routing-mark=r_172