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
#!/bin/bash | |
# This script installs libraries needed to run Savage XR on Ubuntu 18.04 Desktop x86_64 | |
# NOTE: To run Savage XR successfully you also need to do the following | |
# | |
# Run the script to install the required libraries: | |
# wget https://gist.githubusercontent.com/giner/deda63984b3e45cced7af1d3dcd792ea/raw/install_libs_for_savage-xr.sh | |
# chmod +x ./install_libs_for_savage-xr.sh | |
# sudo ./install_libs_for_savage-xr.sh |
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
# Call an arbitrary function from a shared C library | |
# | |
# Usage example: | |
# require './extlib' | |
# | |
# ExtLib.init('libc.so.6', 'char* gnu_get_libc_version()'); | |
# puts ExtLib.gnu_get_libc_version() | |
# | |
# OUTPUT: 2.27 |
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
sudo apt install libsecret-1-dev | |
dest_bin="$HOME/bin/git-credential-libsecret" | |
# Compile git-credential-libsecret | |
cd "$(mktemp -d)" | |
cp /usr/share/doc/git/contrib/credential/libsecret/* . | |
make | |
# Install git-credential-libsecret |
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
ansible_version="2.9.*" | |
sudo apt-add-repository universe | |
sudo apt install -y python3-pip python3-venv | |
[[ -d "$HOME/bin" ]] || { mkdir "$HOME/bin"; source $HOME/.profile; } | |
python3 -m venv ~/ansible | |
~/ansible/bin/pip3 install wheel |
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
## bash: keep longer history | |
sed -i 's/^HISTSIZE=1000$/HISTSIZE=10000/' ~/.bashrc | |
sed -i 's/^HISTFILESIZE=2000$/HISTFILESIZE=20000/' ~/.bashrc | |
## Enable search through history with PgUp/PgDn | |
cat > ~/.inputrc << 'EOF' | |
$include /etc/inputrc | |
# alternate mappings for "page up" and "page down" to search the history | |
"\e[5~": history-search-backward |
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
// Usage: | |
// curl -L -O https://repo1.maven.org/maven2/io/github/openfeign/feign-core/11.6/feign-core-11.6.jar | |
// java -cp feign-core-11.6.jar HelloFeign.java | |
import feign.Feign; | |
import feign.RequestLine; | |
public class MyFeignClient { | |
private static final String uriPrefix = "https://github.com"; |
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
# Notes: | |
# - option javax.net.ssl.trustStore replaces default java truststore | |
# i.e. TLS connections other than mTLS won't be possible unless | |
# the new truststore contains Common CA certificates | |
# - The custom CA certificate from truststore.pkcs12 will be used by | |
# all TLS connections initiated from the app. Make sure you can | |
# fully trust this CA in your specific case. | |
# - Generation of the keystores is not a part of this snippet and can | |
# be easily found on other resources | |
# |
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 -S java --source 11 | |
class HelloWorld { | |
public static void main(String[] args) { | |
System.out.println("Hello, World!"); | |
} | |
} |
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
#!/bin/sh | |
# NOTE: This change won't persist if package xkb-data is reinstaled or updated | |
sudo sed -i '/key <I208>/s/\bXF86AudioPlay\b/XF86AudioMicMute/' /usr/share/X11/xkb/symbols/inet |
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
## Move window buttons to the left (mimic Unity) | |
gsettings set org.gnome.desktop.wm.preferences button-layout 'close,maximize,minimize:' | |
## Show date, week day, week number | |
gsettings set org.gnome.desktop.interface clock-show-weekday true | |
gsettings set org.gnome.desktop.calendar show-weekdate true | |
## Assign '<Ctrl><Shift>d' to detach a tab in gnome-terminal | |
GSETTINGS_SCHEMA=org.gnome.Terminal.Legacy.Keybindings | |
GSETTINGS_PATH=/org/gnome/terminal/legacy/keybindings/ |
OlderNewer