Skip to content

Instantly share code, notes, and snippets.

@Cenness
Cenness / rainy dark.xcs
Last active February 29, 2020 16:40
Xshell color scheme | rainy
[rainy dark]
text=dbdbdb
cyan(bold)=34e2e2
text(bold)=ffffff
magenta=c07aef
green=69dd00
green(bold)=92d257
background=2a2a2a
cyan=9dd7e1
red(bold)=e17171
@Cenness
Cenness / oneliners.sh
Last active June 24, 2024 09:37
bash oneliners
systat -ifstat 1
netstat -tulpn | grep :80
chcon -R -t httpd_sys_content_t /path/to/file
semanage port -a -t http_port_t -p tcp %port%
nmap %uri% -p- -PN
@Cenness
Cenness / resize.sh
Created May 4, 2017 13:44
RaspberryPi - resize the main partition to fill the SD card if there is more than 1GiB of free space on reboot
#!/bin/bash
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
## resize the main partition to fill the SD card if there is more than 1GiB of free space
unused_space="$(parted /dev/mmcblk0 unit GiB print free | awk '/Free Space/{c++; sum += $3} END{print sum}' | awk '{print ($0>1)?1:0}')"
if (( $unused_space ))
then
@Cenness
Cenness / erx-add-a-domain-to-addrgrp.sh
Last active October 27, 2022 21:00
Populate address group (edgeos)
#!/usr/bin/env bash
require(){ hash "$@" 2>/dev/null || { echo "$@ is missing"; exit 127;};}
require grepcidr
require curl
require dig
require jq
## export A_GROUP="address_group_name"
@Cenness
Cenness / gist:60f01ed0831ba8f175b22da57ef8a3db
Created February 24, 2022 18:01 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

@Cenness
Cenness / docker-in-wsl2.md
Created April 17, 2022 17:21
Update WSL to v2 and install docker in debian

host cmd - elevated

Update to WSL2

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Restart host.
This will take a while:

wsl --set-default-version 2
@Cenness
Cenness / colors.json
Last active November 5, 2023 12:56
Print out color pairs with their contrast
[
{
"type": "colordef",
"BLACK": [ 33, 34, 37 ],
"RED": [ 254, 63, 22 ],
"GREEN": [ 60, 168, 103 ],
"BROWN": [ 223, 112, 30 ],
"BLUE": [ 0, 106, 170 ],
"MAGENTA": [ 235, 82, 177 ],
"CYAN": [ 7, 163, 167 ],