This gist aims to facilitate the switching from bash
to zsh
as our defaut shell.
We will be using oh-my-zsh with the powerful theme: Powerlevel9k. You will find all the links below.
This process applies mainly for Arch Linux, but can be setup for any other distro (in theory :)).
I'm also using Gnome Terminal and pacaur as package manager.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ATTENTION: Check the Troubleshooting items below if you have problems, you can also visit my website where I wrote about it. | |
# LINK: https://fernandocejas.com/blog/engineering/2020-12-28-install-arch-linux-full-disk-encryption/#aur-helper | |
#!/bin/bash | |
#Make sure the system is up to date. | |
sudo pacman -Syu --noconfirm | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
This script aims to alert when the battery | |
reaches a critical level in the system. | |
""" | |
import os | |
CRITICAL_BATTERY_PERCENTAGE = 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
task deployDebug(type: Exec, dependsOn: 'app:installDebug') { | |
def rootDir = project.rootDir | |
def localProperties = new File(rootDir, "local.properties") | |
if (localProperties.exists()) { | |
Properties properties = new Properties() | |
localProperties.withInputStream { | |
inputStream -> properties.load(inputStream) | |
} | |
def sdkDir = properties.getProperty('sdk.dir') | |
def adb = "$sdkDir/platform-tools/adb" |
These are a list of things I have been experiencing and their possible solutions
- Issue:
- gnome-control-center segmentation fault (core dumped)
- https://gitlab.gnome.org/GNOME/gnome-control-center/issues/411
-
Info:
-
Command:
-
pacaur -S terminus-font
-
1 - Open the terminal and type below given command
cd /root
yum install wget (you can skip this step if wget is already installed)
wget https://assets.ubuntu.com/v1/fad7939b-ubuntu-font-family-0.83.zip (check the newest version)
2 - Check if the directory /usr/share/fonts exist. If the fonts directory do not exist,you can create yourself.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
pid=$(pgrep gammastep) | |
if [[ $1 = "toggle" ]]; then | |
if pgrep -x "gammastep" > /dev/null; then | |
kill -9 $(pgrep -x "gammastep"); | |
else | |
gammastep -O ${GAMMASTEP_NIGHT:-3500} & | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----------------------------------------------- | |
# BEFORE USING THIS SCRIPT | |
# ----------------------------------------------- | |
# 1 - Create a file in /etc/<yourpassfile>.pass which contains the vpn private key password. | |
# 2 - Set permission for the file: 'sudo chmod 600 /etc/<yourpassfile>.pass' - Owner can read and write. | |
# 3 - Create an alias in your .bashrc or bash_profile: alias vpn="sudo sh <path to your script>". | |
# 4 - Set the value of the variable OVPN_FILE_PATH with the path of the .ovpn file. | |
# 5 - Set the value of the variable OVPN_PRIVATE_KEY_FILE_PATH with the path of the created file in step #1: /etc/<yourpassfile>.pass | |
# 6 - OPTIONAL: avoid password when executing the script, add this to /etc/sudoers '<your username> ALL=(ALL:ALL) NOPASSWD:<path to your script>' |
NewerOlder