# install p4v tools
brew install --cask p4v
# configure git
git config --global diff.tool p4merge
git config --global difftool.p4merge.path /Applications/p4merge.app/Contents/Resources/launchp4merge
git config --global difftool.prompt false
git config --global merge.tool p4merge
git config --global mergetool.p4merge.path /Applications/p4merge.app/Contents/Resources/launchp4merge
This file contains hidden or 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
| function useTaskQueue(params: { | |
| shouldProcess: boolean | |
| }): { | |
| tasks: ReadonlyArray<Task> | |
| isProcessing: boolean | |
| addTask: (task: Task) => void | |
| } { | |
| const [queue, setQueue] = React.useState<{ | |
| isProcessing: boolean | |
| tasks: Array<Task> |
This file contains hidden or 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 | |
| sudo apt-get install -y devilspie | |
| mkdir -p ~/.devilspie | |
| echo ' | |
| (if (contains (window_class) "Code") | |
| (begin | |
| (spawn_async (str "xprop -id " (window_xid) " -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 ")) | |
| (spawn_async (str "xprop -id " (window_xid) " -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY 0xD8000000")) |
This file contains hidden or 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 | |
| function get_active_window() { | |
| printf "0x%08x" $(xdotool getactivewindow) | |
| } | |
| function get_current_opacity() { | |
| window="$1" | |
| opacity=$(xprop -id $window | grep _NET_WM_WINDOW_OPACITY | awk '{print $3}') | |
| if [ -z $opacity ]; then |
This file contains hidden or 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 | |
| # Change to the script's directory & create directory | |
| cd $(dirname "$(readlink -f "$0")") | |
| mkdir -p ./dbdumps | |
| # Load database name + root password | |
| source .env | |
| # Check if variables were provided |
- Install required packages
brew install cuetools flac ffmpeg shntool
- Split flac file by cue
$ shnsplit -o flac -f file.cue file.flac
This file contains hidden or 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
| const http = require('http'); | |
| const server = http.createServer(); | |
| server.on('request', (request, response) => { | |
| let body = []; | |
| request.on('data', (chunk) => { | |
| body.push(chunk); | |
| }).on('end', () => { | |
| body = Buffer.concat(body).toString(); |
This file contains hidden or 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
| class Logger { | |
| constructor() { | |
| if (!Logger.instance) { | |
| Logger.instance = this; | |
| } | |
| return Logger.instance; | |
| } | |
| log(...args) { | |
| console.log(...args); |
This file contains hidden or 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
| # Instructions for 4.14 and cuda 9.1 | |
| # If upgrading from 4.13 and cuda 9.0 | |
| $ sudo apt-get purge --auto-remove libcud* | |
| $ sudo apt-get purge --auto-remove cuda* | |
| $ sudo apt-get purge --auto-remove nvidia* | |
| # also remove the container directory direcotory at /usr/local/cuda-9.0/ | |
| # Important libs required with 4.14.x with Cuda 9.X | |
| $ sudo apt install libelf1 libelf-dev |
NewerOlder