Skip to content

Instantly share code, notes, and snippets.

@radut
radut / bgmccollum-directions
Created August 19, 2023 00:46 — forked from lbragstad/bgmccollum-directions
Deploying OpenStack Queens with OpenStack-Ansible (Manual)
# Decide a Range of IP Address Your Router Will Manage, and a Range of IP Address Neutron Will Manage
# Adjust To Accomodate For Any Static Assignments (Such as 192.168.1.1 for Your Router)
# Ensure These IP Address Ranges, and Any Static Assignments Do Not Overlap
#
# For Example:
#
# Home Network Subnet: 192.168.1.0/24
# Router Static: 192.168.1.1
# Laptop Static: 192.168.1.2
# OSA-AIO Static: 192.168.1.3
@radut
radut / SSLPoke.java
Created May 4, 2023 08:00 — forked from MatthewJDavis/SSLPoke.java
Java SSL poke from atlassian
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.io.*;
/** Establish a SSL connection to a host and port, writes a byte and
* prints the response. See
* http://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+services
*/
public class SSLPoke {
public static void main(String[] args) {
@radut
radut / monzo-alertmanager-config.yaml
Created April 6, 2022 17:08 — forked from milesbxf/monzo-alertmanager-config.yaml
Monzo's Alertmanager Slack templates
###################################################
##
## Alertmanager YAML configuration for routing.
##
## Will route alerts with a code_owner label to the slack-code-owners receiver
## configured above, but will continue processing them to send to both a
## central Slack channel (slack-monitoring) and PagerDuty receivers
## (pd-warning and pd-critical)
##

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@radut
radut / s3cmdclearfiles
Created May 24, 2021 13:14 — forked from JProffitt71/s3cmdclearfiles
Uses s3cmd to manually remove files older than specified date (##d|m|y) in a specified bucket
#!/bin/bash
# Usage: ./s3cmdclearfiles "bucketname" "30d"
s3cmd ls s3://$1 | grep " DIR " -v | while read -r line;
do
createDate=`echo $line|awk {'print $1" "$2'}`
createDate=`date -j -f "%Y-%m-%d %H:%M" "$createDate" +%s`
olderThan=`date -j -v-$2 +%s`
if [[ $createDate -lt $olderThan ]]
@radut
radut / pi-tips.md
Created January 6, 2021 14:49 — forked from rdmarsh/pi-tips.md
Clean up the Raspbian default build for the Raspberry Pi

Remove unused packages on Raspberry Pi

(this is worth looking at http://www.stefan-seelmann.de/wiki/rasperrypi-homeserver, which is basically this:

apt-get purge --auto-remove scratch debian-reference-en dillo idle3 python3-tk idle python-pygame python-tk lightdm gnome-themes-standard gnome-icon-theme raspberrypi-artwork gvfs-backends gvfs-fuse desktop-base lxpolkit netsurf-gtk zenity xdg-utils mupdf gtk2-engines alsa-utils  lxde lxtask menu-xdg gksu midori xserver-xorg xinit xserver-xorg-video-fbdev libraspberrypi-dev libraspberrypi-doc dbus-x11 libx11-6 libx11-data libx11-xcb1 x11-common x11-utils lxde-icon-theme gconf-service gconf2-common

)

Warning: this will probably break something. If you need sound, don't remove the "alsa" packages

sudo apt-get --yes purge xserver-common x11-xfs-utils x11-xserver-utils xinit libsmbclient blt gvfs gvfs-backends gvfs-daemons gvfs-fuse idle idle-python2.7 idle-python3.2 idle3 libaudio2 libice6 liblightdm-gobject-1-0 libobrender27 libpulse0 libqt4-svg libqt

@radut
radut / AdbCommands
Created December 10, 2020 04:53 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
@radut
radut / iterm2.md
Created August 24, 2020 12:01 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@radut
radut / README.md
Created August 21, 2020 11:39 — forked from bobguo/README.md
dnsmasq & dnscrypt on mac osx

Install & Configure

  1. Install DNSMasq
$ brew install dnsmasq
  1. Install DNSCrypt-proxy
$ brew install dnscrypt-proxy
@radut
radut / ssh-d4m
Created August 20, 2020 23:08 — forked from rmetzler/ssh-d4m
SSH into Docker for Mac xhyve VM
1. screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
2. when done use CTRL-A CTRL-\ and then y (for yes) to exit
Alternative method:
1. docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh