Skip to content

Instantly share code, notes, and snippets.


Justin Force e0da

View GitHub Profile
e0da /
Last active Sep 16, 2020

e0da prompt

e0da prompt example

.zshrc goes in $HOME, everything else goes in $HOME/share, and you want to brew install zsh-git-prompt. I'm using Gruvbox here with macOS Terminal.

tankerkiller125 / firefox-developer.desktop
Created Feb 24, 2018
UMake Firefox Developer Edition, Touch Support, Actions Support
View firefox-developer.desktop
[Desktop Entry]
Name=Firefox Developer Edition
Exec=env MOZ_USE_XINPUT2=1 firefox-developer
Comment=Firefox Aurora with Developer tools
chenxiaolong /
Created Nov 27, 2017
Switching between AHCI and RAID on the Dell XPS 15 (9560)

Switching between AHCI and RAID on the Dell XPS 15 (9560)

This guide likely applies to other models and, potentially, even laptops from other OEMs that have NVME drives. However, I've only tested this on my Dell XPS 15 (9560) with the OEM Windows installation from the Signature Edition model.

Switching from RAID to AHCI

Switching from RAID to AHCI is significantly simpler than switching from AHCI to RAID. All that's needed is a successful boot to Safe Mode.

  1. To set the default boot mode to Safe Mode, use msconfig.exe or open an admin cmd/PowerShell window and run:
View AWS access key grep
url -
Finding hard-coded credentials in your code
Hopefully you’re excited about deploying credentials to EC2 that are automatically rotated. Now that you’re using Roles, a good security practice would be to go through your code and remove any references to AKID/Secret. We suggest running the following regular expressions against your code base:
Search for access key IDs: (?<![A-Z0-9])[A-Z0-9]{20}(?![A-Z0-9]). In English, this regular expression says: Find me 20-character, uppercase, alphanumeric strings that don’t have any uppercase, alphanumeric characters immediately before or after.
Search for secret access keys: (?<![A-Za-z0-9/+=])[A-Za-z0-9/+=]{40}(?![A-Za-z0-9/+=]). In English, this regular expression says: Find me 40-character, base-64 strings that don’t have any base 64 characters immediately before or after.
If grep is your preferred tool, run a recursive, Perl-compatible search using the following commands
View swapesc
current=$(dconf read /org/gnome/desktop/input-sources/xkb-options)
echo "Current status: $current"
if [ "$current" == "$swapped" ]
echo "Making caps and escape WORK NORMALLY"
ShPakvel / general_helper.rb
Created Oct 15, 2014
Grape permitted_params helper. It works the same as Rails strong params. Only params defined in params block will remain.
View general_helper.rb
module GeneralHelper
def permitted_params
@permitted_params ||= declared(params, include_missing: false)
lonetwin / Git dot files management
Last active Jun 17, 2020
A simple way to manage dotfiles with git without silly symlinks and special tools. Just use negative matches in your .gitignore !
View Git dot files management
I like to manage dotfiles without having to mess with silly symlinks or having
to install/configure specific dotfile managament tools. So here's what I did:
$ cd ~
$ git init .
$ echo '*' > .gitignore # ignore all files by default
$ echo '!.bashrc' >> .gitignore # ...and then tell git what files not to *not* ignore
$ # ...add other files you may want to track to *not* ignore
$ git add .bashrc # now actually add the files to git
$ git add .gitignore # add the .gitignore to git
LeahCim / 25_pre-os-prober
Created Mar 3, 2014
In Ubuntu, /etc/grub.d/30_os-prober overrides grub menu style and timeout defined by the user in /etc/default/grub. Here is a workaround to save the menu style and timeout values before os-prober changes them, and to restore them afterwards. The two files need to be placed under /etc/grub.d and made executable. Finally, "sudo update-grub" should…
View 25_pre-os-prober
#! /bin/sh
set -e
# Save the $timeout and $timeout_style values set by /etc/grub.d/00_header
# before /etc/grub.d/30_os-prober messes them up.
cat << EOF
set timeout_bak=\${timeout}
set timeout_style_bak=\${timeout_style}
namuol /
Last active Oct 22, 2020
rage-quit support for bash

rage-quit support for bash


Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

OpenNingia / terminal_color_scheme
Last active Jul 27, 2017
Simple script to apply Solarized color scheme to Pantheon Terminal
View terminal_color_scheme
# -*- coding: utf-8 -*-
"""Solarized theme for pantheon-terminal
import posixpath
import sys
from gi.repository import Gio
You can’t perform that action at this time.