$ git add <filename>
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
module.exports = { | |
chainWebpack: config => { | |
config.plugin('html').tap(args => { | |
args[0].hash = true | |
return args | |
}) | |
} | |
} |
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 -eux | |
# Extracts and load PSX games that are distributed in .7z / .ape format. | |
# Requires : ffmpeg, perl, cdemu, ecm2bin | |
GAME_FOLDER="$1" | |
EXTRACT_FOLDER=/tmp/game | |
rm -rf "$EXTRACT_FOLDER" | |
mkdir "$EXTRACT_FOLDER" | |
cp -rf "$GAME_FOLDER"/* "$EXTRACT_FOLDER" |
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/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
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
import subprocess | |
import re | |
command = ['qdbus', 'org.kde.plasmashell', '/PlasmaShell', 'org.kde.PlasmaShell.evaluateScript'] | |
command.append(""" | |
var allDesktops = desktops(); | |
for (i=0;i<allDesktops.length;i++) | |
{ | |
d = allDesktops[i]; | |
d.wallpaperPlugin = "org.kde.image"; |
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 | |
# !!WARNING!! | |
# This will DELETE all efforts you have put into configuring nix | |
# Have a look through everything that gets deleted / copied over | |
nix-env -e '.*' | |
rm -rf $HOME/.nix-* | |
rm -rf $HOME/.config/nixpkgs |
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
# Recover files from ext4magic based on the path to the missing textfile | |
# After running ext4magic -m /path/to/device, from the directory containing RECOVERDIR, run this script with the path to the directory containing text files you want to recover. | |
# Example: | |
# ext4magic_recover_text.sh /home/cameron/lostfiles | |
function get_timestamp() { | |
date -d @${1} | cut -d' ' -f1-6 | sed 's/ /_/g' | |
} | |
for file in $(grep -Rl $1 ./RECOVERDIR/ 2> /dev/null) |
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 | |
tmp="`mktemp`" | |
url="https://api.github.com/users/ferrybig/repos?per_page=100" | |
while [ ! -z "$url" ]; do | |
echo "Fetching $url..." >&2 | |
curl --dump-header "$tmp" "$url" | |
url="`< "$tmp" grep Link | grep -oE "[a-zA-Z0-9:/?=.&_]*>; rel=.next" | cut -d'>' -f1`" | |
done | grep clone_url | cut -d'"' -f4 | while read url; | |
do | |
project="`basename "$url"`" |
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 | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
TIMESTAMP=`date +"%Y-%m-%d-%T"` | |
BACKUP_DIR="${DIR}/${TIMESTAMP}" | |
APPDATA_DIR="${DIR}/../appdata" | |
MYSQL_USER="root" | |
MYSQL_PASSWORD="abc123" | |
MYSQL_DB="nextcloud_db" |
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 | |
[[ `uname` == "Linux" ]] && PRODUCT_JSON="/usr/lib/code/product.json" | |
[[ `uname` == "Darwin" ]] && PRODUCT_JSON="/Applications/VSCodium.app/Contents/Resources/app/product.json" | |
echo "edit the following file" | |
echo "$PRODUCT_JSON" | |
echo "" | |
echo "find the following property" | |
echo "extensionsGallery" | |
echo "" |
OlderNewer