Skip to content

Instantly share code, notes, and snippets.

View JorgeFrancoIbanez's full-sized avatar

Jorge Franco Ibañez JorgeFrancoIbanez

  • Ubisoft
  • Montreal
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="oobeSystem">
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<!-- logon this user automatically
which runs first logon commands -->
<UserAccounts>
<AdministratorPassword>
<Value>ormuco</Value>
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Services\MapsBroker' -Name Start -Value 4
$onesync = (Get-ChildItem 'HKLM:\System\CurrentControlSet\Services' | ?{$_.PSChildName -like "OneSync*"}).Name
$here = Get-Location
cd HKLM:\
ForEach($sync in $onesync) {
Set-ItemProperty -Path $sync -Name Start -Value 4
}
cd $here
Get-Service OneSync* | Stop-Service -Force
Get-Service MapsBroker | Stop-Service -Force
How to disable cloud-init in Ubuntu
Prevent start
Create an empty file to prevent the service from starting
sudo touch /etc/cloud/cloud-init.disabled
Uninstall
Disable all services (uncheck everything except "None"):
dpkg-reconfigure cloud-init
Uninstall the package and delete the folders
@JorgeFrancoIbanez
JorgeFrancoIbanez / vim_add_theme.sh
Last active October 15, 2020 14:04
Set up vim themes on bash (Debian/Ubuntu) Usage: chmod +x /path/vim_add_theme.sh | /path/vim_add_theme.sh <name_of theme> <url_raw_color_file>
#!/bin/bash
############## README #######################
# This script will clean your ~/.vimrc #
# If you want to use it ahve that in mind. #
#############################################
### Vim themes ###
## https://www.slant.co/topics/480/~best-vim-color-schemes
##################
@JorgeFrancoIbanez
JorgeFrancoIbanez / lsiommu
Created December 8, 2020 18:25 — forked from flungo/lsiommu
List the devices and their IOMMU groups.
#!/bin/bash
for d in $(find /sys/kernel/iommu_groups/ -type l | sort -n -k5 -t/); do
n=${d#*/iommu_groups/*}; n=${n%%/*}
printf 'IOMMU Group %s ' "$n"
lspci -nns "${d##*/}"
done;
@JorgeFrancoIbanez
JorgeFrancoIbanez / fedora_install_python3.md
Created December 7, 2022 15:39 — forked from zobayer1/fedora_install_python3.md
Install Python 3.6, 3.7, 3.8 in your Fedora system

Python 3.9 comes as a default with Fedora 34. However, sometimes you may wish to install older versions for development and test purposes. Apart from groupinstall command, these instructions work for CentOS and REHL systems as well.

Prerequisites

Install python development dependencies.

sudo dnf groupinstall "Development Tools"
sudo dnf install python3-devel openssl-devel zlib-devel bzip2-devel sqlite-devel libffi-devel

Note: You will need to rebuild and reinstall if you install new source or development libraries for python. Do not create or modify symlinks for python, python3, etc, as that may and will break many dependent libraries in your system.