Maintainer: Keil Miller Jr
How to create and manage an AUR package.
The following link should be read:
// ==UserScript== | |
// @name Prevent link mangling on Google | |
// @namespace LordBusiness.LMG | |
// @match https://www.google.com/search | |
// @grant none | |
// @version 1.1 | |
// @author radiantly | |
// @description Prevent google from mangling the link when copying or clicking the link on Firefox | |
// ==/UserScript== |
Maintainer: Keil Miller Jr
How to create and manage an AUR package.
The following link should be read:
To avoid some bugs in wg-quick and/or iptables on my Synology:
Credit where credit is due. I got this idea from the Wireguard website. https://www.wireguard.com/netns/#the-new-namespace-solution
package main | |
import ( | |
"errors" | |
"fmt" | |
_ "github.com/go-sql-driver/mysql" | |
"github.com/jinzhu/gorm" | |
) |
// https://play.golang.org/p/l_GmjX31XbM | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
// Main has a Field2 whose type we don't know at the time of unmarshaling. We |
#!/bin/bash | |
# Workaround for https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1784152 | |
# Copy the script to /lib/systemd/system-sleep/reload-dell-touchpad.sh | |
SUSPEND_MODULES="i2c_hid" | |
case $1 in | |
pre) | |
for mod in $SUSPEND_MODULES; do | |
rmmod $mod |
#!/bin/bash | |
export TARGET=amd64-marcel-freebsd9.2 | |
export PREFIX=/usr/cross-build | |
export TARGET_PREFIX=$PREFIX/$TARGET | |
export PATH=$PATH:$PREFIX/bin | |
mkdir -p $TARGET_PREFIX{,/lib,/include} | |
mkdir build-{binutils,gmp,mpfr,mpci,gcc} |
Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.
git revert {commit_id}
Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
# ~/code/web:beta_directory$ git checkout master | |
# Switched to branch "master" | |
# ~/code/web:master$ git checkout beta_directory | |
# Switched to branch "beta_directory" |