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
| bitrate = 160 | |
| cover_max_scale = 2 | |
| flip_status_indicators = true | |
| initial_screen = "library" | |
| notify = true | |
| use_nerdfont = true | |
| library_tabs = ["tracks", "playlists", "albums", "artists", "browse"] | |
| [keybindings] |
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
| import pandas as pd | |
| import visidata as vd | |
| df=pd.read_csv('file.csv') | |
| vd.view_pandas(df) |
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
| # Based on https://gist.github.com/kmatt/71603170556ef8ffd14984af77ff10c5 | |
| # prompt ">" indicates Powershell commands | |
| # prompt "$" are Linux shell commands | |
| # https://docs.microsoft.com/en-us/windows/wsl/install-win10 | |
| > dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
| > dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
| # install https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi |
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
| " Linux / macOS: curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
| " PowerShell: iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |` ni $HOME/vimfiles/autoload/plug.vim -Force | |
| " `:!pip install setuptools` may be needed for python-mode | |
| let g:go_version_warning = 0 | |
| let g:pymode_python = 'python3' | |
| let g:python3_host_prog = expand('/usr/bin/python3') | |
| call plug#begin() |
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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| if [ "${1:-}" = "--help" ]; then | |
| cat << EOF | |
| Usage: ijq [filename] | |
| A wrapper around jq that uses fzf to interactively build jq filters. |
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 | |
| if [ "$#" -eq 0 ]; then | |
| echo "Usage: $0 FILENAME | 'WILDCARD' (in single quotes)" | |
| exit | |
| fi | |
| slug() { | |
| # Replace non-alpha characters and rename file | |
| f=$(basename "$1") |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| # dump | |
| pg_dump testdb | pv -c -s $(psql -tc "SELECT pg_database_size('testdb')") -N dump | gzip > testdb.sql.gz | |
| # restore | |
| pv testdb_20120501.sql.gz | zcat | psql testdb |
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
| " Based on https://thegreata.pe/articles/2020/07/11/vim-syntax-highlighting-for-sql-strings-inside-python-code/ | |
| if exists('g:enable_sql_python_string') && g:enable_sql_python_string | |
| let s:bcs = b:current_syntax | |
| unlet b:current_syntax | |
| syn include @SQL syntax/sql.vim | |
| syntax region sqlPythonString | |
| \ matchgroup=SpecialComment | |
| \ start=~\z('''\|"""\)\_s*\(ALTER\|BEGIN\|CALL\|COMMENT\|COMMIT\|CONNECT\|CREATE\|DELETE\|DROP\|END\|EXPLAIN\|EXPORT\|GRANT\|IMPORT\|INSERT\|LOAD\|LOCK\|MERGE\|REFRESH\|RENAME\|REPLACE\|REVOKE\|ROLLBACK\|SELECT\|SET\|TRUNCATE\|UNLOAD\|UNSET\|UPDATE\|UPSERT\|WITH\)~ |
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
| # Warning | |
| Clear-Host | |
| Write-Output "Run this script on the computer you want to access via RDP" | |
| Write-Output "" | |
| # Ask | |
| Write-Output "Remote address can be an IP address or network with CIDR" | |
| Write-Output "Example: 192.168.0.5 or 192.168.0.0/24" | |
| Write-Output "" | |
| $RemoteAddress = Read-Host "Remote Address" |
NewerOlder