Skip to content

Instantly share code, notes, and snippets.

View funguscolander's full-sized avatar
💭
Designing a new turbo encabulator

Fergus Collins funguscolander

💭
Designing a new turbo encabulator
  • Intel
  • Ireland
View GitHub Profile
#!/usr/bin/env bash
#: Your comments here.
set -o errexit
set -o nounset
set -o pipefail
work_dir=$(dirname "$(readlink --canonicalize-existing "${0}" 2> /dev/null)")
readonly conf_file="${work_dir}/script.conf"
readonly error_reading_conf_file=80
readonly error_parsing_options=81
readonly script_name="${0##*/}"
@NeoTheFox
NeoTheFox / pg9167.conf
Created July 24, 2020 15:43
xboxdrv config for PG-9167
#iPEGA PG-9167 Config
[xboxdrv]
evdev-debug = false
evdev-grab = true
rumble = false
mimic-xpad = true
[evdev-absmap]
ABS_HAT0X = dpad_x
@avonmoll
avonmoll / 0_how-I-use-papis.md
Last active April 3, 2024 18:30
A Guide on How to Use papis Sensibly

Installation

Easiest, if you have pip:

$ pip install papis

Adding Documents

Most of the time I add documents via their DOI. For example, I'll be on IEEExplore or ResearchGate and see a paper that I either want to read or know for sure I'll want to cite. So I simply copy the DOI and run

@jackkinsella
jackkinsella / .vimrc
Created February 5, 2020 11:17
.vimrc
" Location for installing plugins
call plug#begin('~/.vim/plugged')
" Other plugins are specified with user/repo on Github or x.vim on vimscripts
" Git integration (status bar and commands like Gblame)
Plug 'tpope/vim-fugitive'
" Add info to sidebar about git
Plug 'airblade/vim-gitgutter'
" Add file-management commands like :Delete, :Move, and :Rename
Plug 'tpope/vim-eunuch'
@djmitche
djmitche / @@INTRO.md
Last active June 7, 2024 13:08
My use of Taskwarrior

Getting Started

My Usage

I've been using this for almost ten years now, so here are some of the ways I have set it up to be most productive. See my taskrc below for implementation details.

In general, I've had the most success by keeping lists of tasks short and to the point, avoiding the anxiety of seeing 100 tasks and feeling like I'm going to drown.

@Darkhogg
Darkhogg / !RebootToOs.md
Last active July 25, 2024 10:49
"Reboot to {OS}" scripts for rEFInd Next Boot selection

Reboot to {OS}

This a collection of notes and files used in my quest to create "Reboot to Windows" and "Reboot to Linux" scripts (and desktop shortcuts) for Linux and Windows respectively that automatically reboot my system and instruct rEFInd to auto-select the appropriate OS entry.

General Information

The key for achieving this is to modify the EFI Variable PreviousBoot with GUID 36d08fa7-cf0b-42f5-8f14-68df73ed3740, which rEFInd uses to store the last entry selected in the menu and, if using the + default entry, will be used to select the default OS. By doing this, we trick rEFInd into booting the OS we choose without having to be physically there to press the keyboard.

@jackkinsella
jackkinsella / convert-word-files-to-markdown.sh
Last active March 10, 2021 15:31
Convert a folder of Word files to markdown using Pandoc
for filename in edited/*.docx; do
pandoc -s $filename -t markdown_mmd --extract-media "media-`$filename | cut -d- -f1-2`" --wrap=none --smart --normalize -o "`basename $filename .docx`".md
done
@airstrike
airstrike / mute-mic.ahk
Last active December 29, 2023 22:08
AutoHotkey | Toggle microphone hotkey script (Windows+U)
;
; AutoHotkey Version: v1.1.22.06
; Language: English
; Platform: Windows 10
; Author: Andy Terra <github.com/airstrike>
;
; Script Function:
; Toggle Microphone Mute -- assumes it is located at WAVE:1, device #2
; Use the SoundCardAnalysis script to figure out where your mic is
; https://www.autohotkey.com/docs/commands/SoundSet.htm#Ex
@chunyan
chunyan / gist:b426e4b696ff3e7b9afb
Created September 17, 2014 06:33
sed cheat sheet
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html
# Note: ~/.ssh/environment should not be used, as it
# already has a different purpose in SSH.
env=~/.ssh/agent.env
# Note: Don't bother checking SSH_AGENT_PID. It's not used
# by SSH itself, and it might even be incorrect
# (for example, when using agent-forwarding over SSH).
agent_is_running() {