Skip to content

Instantly share code, notes, and snippets.

@fcenobi
fcenobi / argparse.sh
Last active July 30, 2022 01:20 — forked from mangalbhaskar/argparse.sh
key value parser for shell script for bash shell
declare -A args
while [[ "$#" > "0" ]]; do
case "$1" in
(*=*)
_key="${1%%=*}" && _key="${_key/--/}" && _val="${1#*=}"
args[${_key}]="${_val}"
# (>&2 echo -e "key:val => ${_key}:${_val}")
;;
esac
shift
@fcenobi
fcenobi / ffserver.conf
Created December 17, 2021 08:29 — forked from peterhellberg/ffserver.conf
MJPEG stream from Webcam using FFServer and FFMpeg
HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 200
MaxClients 100
MaxBandWidth 500000
CustomLog -
<Feed camera.ffm>
File /tmp/camera.ffm
FileMaxSize 200M
@fcenobi
fcenobi / recvlkv373.py
Created December 17, 2021 06:21 — forked from danielkucera/recvlkv373.py
./recvlkv373.py 226.2.2.2 2068 out.mjpeg
#!/usr/bin/env python
import socket
import binascii
import sys
def main():
MCAST_GRP = sys.argv[1]
MCAST_PORT = int(sys.argv[2])
@fcenobi
fcenobi / vmware-no-vmem.md
Created September 26, 2021 23:38 — forked from extremecoders-re/vmware-no-vmem.md
Boost VMWare Performance by disabling vmem files.

Prevent creation of vmmem files in VMware (Windows)

Issue

VMWare creates .vmem files to back the guest RAM. On the host this causes disk thrashing especially during powering on and off the guest.

Solution

Add the following lines to the .vmx file to prevent creation of .vmem files. This will reduce disk IO and VM performance will improve especially on non-SSD disks.

@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.
#
@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 / 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 / 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 / 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