Skip to content

Instantly share code, notes, and snippets.

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

Feldwor BoQsc

💭
I may be slow to respond.
  • Public Domain
  • Baltic States
  • 21:38 (UTC +03:00)
View GitHub Profile
@BoQsc
BoQsc / setGrubTimeoutToZero.md
Last active July 20, 2019 15:25
I have Dual Boot: Windows 10 + Ubuntu 19.10. I've got tired of Windows operating system. Today, I tried to remove timeout for the Grub2. However, simply setting Timeout to 0, in the file: /etc/default/grub did not work. This Workaround does work.

Problem: Setting Grub2 Timeout to 0 leads to the same Timeout 10, on Dual Boot.

These are the instructions to make Grub2 load Ubuntu directly.

  1. Open Grub2 Default Settings file: sudo gedit /etc/default/grub
  2. Changing the Grub2 Settings file
    1. Make sure GRUB_TIMEOUT is set to 0
    2. Make sure to add GRUB_DISABLE_OS_PROBER=true line somewhere.
    3. Make sure to add GRUB_RECORDFAIL_TIMEOUT=$GRUB_TIMEOUT line somewhere near as well.
    • Summary: These are the additions and changes to the file: /etc/default/grub

Remove Ubuntu partition and follow the instructions below, Source: https://askubuntu.com/a/869888

This answer is for those with UEFI who have deleted the Ubuntu partitions before removing grub

You will be doing this from Windows 10. No bootable media required.

Where bootrec /fixmbr, bootsect /nt60 and the Ubuntu live with the boot-repair suggestions have failed, this has worked for me:

(This answer borrowed verbatim from [here][1])

@BoQsc
BoQsc / Gists.md
Last active June 5, 2025 10:49
How to search my own Gists
@BoQsc
BoQsc / bootToWindows.md
Last active August 10, 2019 17:00
Command to schedule next GRUB2 boot into Windows or BIOS/UEFI (Tested on Ubuntu only)

Find menu entry

Note: There is no Windows operating system entry, since GRUB_DISABLE_OS_PROBER=true variable existed in the file/etc/default/grub

vaidas@vaidas-SATELLITE-L855:~$ awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg 
Ubuntu
Ubuntu, with Linux 5.2.0-8-generic
Ubuntu, with Linux 5.2.0-8-generic (recovery mode)
Ubuntu, with Linux 5.0.0-20-generic
@BoQsc
BoQsc / MinecraftLauncher.cmd
Last active March 17, 2021 10:07
This script will launch newly downloaded Minecraft Java Edition that is 1.14.3 version
@echo off
title Minecraft Launcher
:: main directory of the game
set "MC_DIR=%APPDATA%\.minecraft"
:: Is stored here...
:: saves/, resourcepacks/ and screenshots/ dirs
:: and options.txt and servers.dat files
set "GAME_DIR=%MC_DIR%\profile"
@BoQsc
BoQsc / ScreenTurnOnOff.md
Created August 11, 2019 22:22
Turn off the monitor In Windows X System
@BoQsc
BoQsc / installOriginalGnomeSessionToUbuntu.md
Last active September 7, 2019 15:56
Touch-pad tap is not enabled by default in the original GNU Gnome Desktop environment

To install Gnome Session: sudo apt install gnome-session.

To enable touchpad Tap-click after Gnome session installation:

vaidas@vaidas-SATELLITE-L855:~$ gsettings get org.gnome.desktop.peripherals.touchpad tap-to-click
false
vaidas@vaidas-SATELLITE-L855:~$ gsettings set org.gnome.desktop.peripherals.touchpad tap-to-click true
vaidas@vaidas-SATELLITE-L855:~$ 
@BoQsc
BoQsc / dubCreateProject.batch
Last active September 18, 2019 16:49
D lang Dub project creation using batch script
#!/usr/bin/env bash
## https://stackoverflow.com/questions/16508817/how-do-i-provide-input-to-a-c-program-from-bash/16509089#16509089
rm "dub.json"
rm "dub.sdl"
rm ".gitignore"
rm -r "source"
(
echo "sdl" #Package recipe format
@BoQsc
BoQsc / blocking internet access via Firewall.cmd
Created October 21, 2019 08:44
This Batch script Adds a Windows Defender Firewall rule to block any HTTPS (443 port) connections
@ECHO OFF
REM Make the all HTTPS internet sites temporary inaccesible on the whole computer by adding Windows Defender Firewall rule.
REM An "Outbound" Firewall Rule will be added to the Windows Defender Firewall, named "Block internet access to 443 HTTPS protocol temporary for the whole computer session"
REM If Firewall rule named "Block internet access to 443 HTTPS protocol temporary for the whole computer session" already exists - it will be removed
REM Notice: requires administrator's privilegies to remove or add Windows Defender Firewall rule.
netsh advfirewall firewall show rule name="Block internet access to 443 HTTPS protocol temporary for the whole computer session"
if %ERRORLEVEL% equ 0 netsh advfirewall firewall delete rule name="Block internet access to 443 HTTPS protocol temporary for the whole computer session"
if %ERRORLEVEL% equ 1 netsh advfirewall firewall add rule name="Block internet access to 443 HTTPS protocol temporary for the whole computer session" dir=out action=block protocol=TCP
@BoQsc
BoQsc / ubuntu-gnome.bash
Last active July 16, 2021 18:06
Convert Gnome to Ubuntu. The script is in progress.
#!/bin/bash
# gnome-extensions tool introduced in GNOME Shell 3.34.1
# this script won't work for any earlier version of Gnome.
function installDashtoDock(){
gsettings set org.gnome.desktop.wm.preferences button-layout ':minimize,maximize,close'
wget "https://extensions.gnome.org/download-extension/[email protected]?shell_version=9.99.0" -O "dash-to-dock-latest.zip"
gnome-extensions install "dash-to-dock-latest.zip"
gnome-extensions enable "[email protected]"
busctl --user call org.gnome.Shell /org/gnome/Shell org.gnome.Shell Eval s 'Meta.restart("Restarting…")'