Skip to content

Instantly share code, notes, and snippets.

View metalcated's full-sized avatar
💭
I may be slow to respond.

metalcated metalcated

💭
I may be slow to respond.
View GitHub Profile
@marcelrv
marcelrv / _docker-migrate-aufs.md
Last active February 5, 2024 00:21
Docker migrate to overlay2 from aufs script

Docker migrate to overlay2 from aufs script

Crazy that this is pretty much forced change without proper transition script

note. Based on https://www.sylvaincoudeville.fr/2019/12/docker-migrer-le-stockage-aufs-vers-overlay2/ NOT WORKING!!!! IF FOLLOWING THE ABOVE.. SOMEHOW THE CONTAINERS DO NOT RE-APPEAR!

The only way I found that is somewhat automated is the the docker-compose way..

Which is still not 100% and require manual fixing of stupid errors of the docker-compose tool (mainly things that ere not interpreted right, like dates & userIds that need to manually surrounded by quotes etc)

@lordmilko
lordmilko / Tail.reg
Last active June 13, 2022 17:17
Tail Context Menu Item - Right click text files to tail them!
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\txtfile\shell\Tail]
[HKEY_CURRENT_USER\SOFTWARE\Classes\txtfile\shell\Tail\command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -noexit -command \"function tail($path) {$host.ui.RawUI.WindowTitle = $path; gc $path -tail 10 -wait} tail\" \"'%1'\""
@arunoda
arunoda / gist:7790979
Last active February 16, 2024 14:05
Installing SSHPass

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@stbenjam
stbenjam / 10_freeipa_integration.sh
Last active May 29, 2023 15:30
FreeIPA <-> Foreman Integration
#!/bin/bash
# Hook for Foreman/FreeIPA Integration
# Stephen Benjamin <stephen@bitbin.de>
# 11.11.2013
. /etc/sysconfig/foreman-ipa
action=$1 # create or destroy
target=$2 # hostname
@timnew
timnew / Rename.ps1
Last active March 15, 2024 13:49
Script to Rename Computer without Reboot
$ComputerName = "New Name"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname"
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\Computername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname" -value $ComputerName
Set-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" -name "AltDefaultDomainName" -value $ComputerName
@jameskoster
jameskoster / header.php
Created February 3, 2012 12:47
WooCommerce - My Account link
<?php if ( is_user_logged_in() ) { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><?php _e('My Account','woothemes'); ?></a>
<?php }
else { ?>
<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('Login / Register','woothemes'); ?>"><?php _e('Login / Register','woothemes'); ?></a>
<?php } ?>
@tahl
tahl / andadb.sh
Created January 22, 2012 19:33
andadb2.0 modified script (Ubuntu)
#!/bin/bash
#
#Android ADB Installer 2 for Linux Mint 11 and Ubuntu 11.04
#This version is intended to be an improvement on previous version and give the user more installation options and bring more ease to people that want to develop,
#theme, or just whatever other purpose you may want to use something that is in my script for.
#Script written by @ArchDukeDoug and parts of @_CorCor67's scripting code used with permission as well.
#Thanks to @BoneyNicole, @tabbwabb, and @animedbz16 for putting up with me and proofreading and/or testing the script.
#Script version: 2.0.0
menu=