Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / 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 / 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 / ApacheGuacUserMapping.ps1
Created August 1, 2020 03:12 — forked from quonic/ApacheGuacUserMapping.ps1
Appache Guacamole user-mappings.xml file generator for current network
. .\NewXMLDocument.ps1
$rdp_domainname = "MicrosoftAccount"
$rdp_username = "fred"
$ssh_username = "fred"
$vnc_username = "fred"
$rdp_password = "changeme!"
$ssh_password = "changeme!"
$vnc_password = "changeme!"
@fcenobi
fcenobi / wsl2-portforward.ps1
Created August 21, 2020 19:58 — forked from hoonoh/wsl2-portforward.ps1
wsl2 port forwarding script
$remoteAddr = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteAddr -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteAddr = $matches[0];
echo $remoteAddr;
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@fcenobi
fcenobi / export_win_env_var.sh
Created August 21, 2020 21:30 — forked from macchaberrycream/export_win_env_var.sh
export win's environment variable to WSL environment variable
conv_brackets_uscore() {
echo $1 | sed -E 's/[][{}()]/_/g'
return 0
}
conv_path_win_linux() {
local _path
local _del_trailing_slash_path
@fcenobi
fcenobi / install-prereq.ps1
Last active November 9, 2022 23:56
install winget on windows 10 from powershell
function script-from-github ($weburl) {
$ScriptFromGitHub = Invoke-WebRequest $weburl -UseBasicParsing
Invoke-Expression $($ScriptFromGitHub.Content)
}
$weburl = https://gist.githubusercontent.com/fcenobi/502a16e3dc7f97b2b00afd29f87a1025/raw/cc599e096c29a18b398a82c5b3258175bdee0aa8/install-winget.ps1
script-from-github $weburl
taskkill /F /IM explorer.exe
@fcenobi
fcenobi / dev_signed_cert.sh
Created October 10, 2020 06:53 — forked from dobesv/dev_signed_cert.sh
Script to create (1) a local certificate authority, (2) a host certificate signed by that authority for the hostname of your choice
#!/usr/bin/env bash
#
# Usage: dev_signed_cert.sh HOSTNAME
#
# Creates a CA cert and then generates an SSL certificate signed by that CA for the
# given hostname.
#
# After running this, add the generated dev_cert_ca.cert.pem to the trusted root
# authorities in your browser / client system.
#
curl https://raw.githubusercontent.com/fcenobi/script/master/etc/profile.d/aliases.sh > /etc/profile.d/aliases.sh && source /etc/profile.d/aliases.sh