Skip to content

Instantly share code, notes, and snippets.

@mndambuki
mndambuki / make-chr.sh
Created July 24, 2018 05:37 — forked from stroebs/make-chr.sh
Install Mikrotik CHR on a Digital Ocean droplet
wget http://download2.mikrotik.com/routeros/6.40.5/chr-6.40.5.img.zip -O chr.img.zip && \
gunzip -c chr.img.zip > chr.img && \
apt-get update && \
apt install -y qemu-utils pv && \
qemu-img convert chr.img -O qcow2 chr.qcow2 && \
qemu-img resize chr.qcow2 `fdisk /dev/vda -l | head -n 1 | cut -d',' -f 2 | cut -d' ' -f 2` && \
modprobe nbd && \
qemu-nbd -c /dev/nbd0 chr.qcow2 && \
echo "Give some time for qemu-nbd to be ready" && \
sleep 2 && \
@mndambuki
mndambuki / selenium.sh
Created July 25, 2018 08:37 — forked from dhensby/selenium.sh
Selenium, Firefox and Behat on CentOS 7 RHEL 7 and fedora
#!/usr/bin/env bash
# help from:
# https://gist.github.com/textarcana/5855427
# http://tecadmin.net/install-firefox-on-linux/
# install deps
yum install -y java Xvfb firefox
# This version of FF doesn't actually work with latest selenium (for me) so I remove it again

Abstract

In the manual the steps required to install headless Firefox on CentOS 6 are described. Headless Firefox may be needed to perform GUI automated testing.

All steps of this manual have been validated on CentOS 6.8. It should not be a problem to adapt the solution to other distros.

Steps

Upgrade yum

@mndambuki
mndambuki / Evaluation Version 1903
Created September 25, 2019 09:14 — forked from CHEF-KOCH/Evaluation Version 1903
Windows 10 Build 18362.30 (May 2019 Update 1903)
Evaluation images cannot be activated after the evaluation period (90 days) is gone.
------------------------------------------------------------------------------------
Evaluation to Full
------------------
Dism /online /Get-TargetEditions
DISM /online /Set-Edition: /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula
https://docs.microsoft.com/en-us/windows-server/get-started/supported-upgrade-paths
@mndambuki
mndambuki / Pre-installed apps
Last active September 27, 2021 19:54 — forked from CHEF-KOCH/Pre-installed apps
MS Bloatware
Get-AppxPackage "Microsoft.3DBuilder" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.AppConnector" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingFinance" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingFoodAndDrink" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingHealthAndFitness" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingMaps" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingNews" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingSports" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingTranslator" | ForEach-Object {Add-AppxPackage -DisableDevelopmentMode -Register
Get-AppxPackage "Microsoft.BingTra
@mndambuki
mndambuki / remove-gamebar-powershell-win10.md
Created December 18, 2019 09:10 — forked from joshschmelzle/remove-gamebar-powershell-win10.md
Remove the Xbox Game Bar with Powershell on Windows 10

You've probably stumbled upon this researching how to remove the Xbox Game Bar. This gist includes a few different methods you can try. Note you might not have some of these options depending on the version of Windows 10 you're using. And eventually I suspect we may not be able to remove the Game Bar in future builds.

Uninstalling/Removing the Game Bar

(This does not seem to be an option on any recent Windows 10 build)

  1. Press Windows Key or click on the Start menu.
  2. Start typing Xbox or Game Bar, until you get the Xbox Game Bar app to appear in the results.
  3. Right-click on the app and pick Uninstall. Answer Yes to the prompt, and wait for the process to finish.
@mndambuki
mndambuki / officeActivator.bat
Created June 7, 2020 03:41
Activate Microsoft Office 2019
@echo off
title Activate Microsoft Office 2019 !
cls
echo ============================================================================
echo #Project: Activating Microsoft software products
echo ============================================================================
echo.
echo #Supported products:
echo - Microsoft Office Standard 2019
echo - Microsoft Office Professional Plus 2019
@mndambuki
mndambuki / gist:b8125fc8ee01529305bbaa73c43998ee
Created December 4, 2020 17:13
HTACCESS, htaccess, rewrite rules, php, codeigniter: HTACCESS rewrite rules
# ============================================================================== START HTACCESS VARIATIONS
#Options +FollowSymLinks
#Options -Indexes
#DirectoryIndex index.php
#RewriteEngine on
#RewriteCond $1 !^(index.php|robots.txt|file|favicon.ico)
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ index.php/$1 [L,QSA]
@mndambuki
mndambuki / remote_crc.md
Created January 16, 2021 08:33 — forked from tmckayus/remote_crc.md
Running 'crc' on a remote server

Overview: running crc on a remote server

This document shows how to deploy an OpenShift instance on a server using CodeReady Containers (crc) that can be accessed remotely from one or more client machines (sometimes called a "headless" instance). This provides a low-cost test and development platform that can be shared by developers. Deploying this way also allows a user to create an instance that uses more cpu and memory resources than may be available on his or her laptop.

While there are benefits to this type of deployment, please note that the primary use case for crc is to deploy a local OpenShift instance on a workstation or laptop and access it directly from the same machine. The headless setup is configured completely outside of crc itself, and supporting a headless setup is beyond the mission of the crc development team. Please do not ask for changes to crc to support this type of deployment, it will only cost the team time as they politely decline :)

The instructions here were tested with F

@mndambuki
mndambuki / CNTLM Proxy - Centos
Created February 22, 2021 01:59 — forked from lpf23/CNTLM Proxy - Centos
Configure CNTLM Proxy on Centos/Ubuntu
1) Download cntlm rpm package from http://sourceforge.net/projects/cntlm/files/cntlm/
2) Login as root
3) Run command:
$ rpm -ivh cntlm-*.rpm
4a) Obtain password hash for the configuration file in step 4b (do not put plaintext password in configuration)
$ cntlm -H -d <domain> -u <username>