Skip to content

Instantly share code, notes, and snippets.

@rw3iss
rw3iss / rw3iss.zsh-theme
Created November 22, 2022 06:03
rw3iss.zsh-theme
View rw3iss.zsh-theme
PROMPT='%{$fg_bold[green]%}%{$fg[cyan]%}%d %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
ZSH_THEME_GIT_PROMPT_DIRTY=""
ZSH_THEME_GIT_PROMPT_CLEAN=""
RPROMPT='$(git_prompt_status)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%} ✈"
View save_screenshot_to_clipboard_and_desktop
on run {input, parameters}
-- # Screen Shot to Clipboard and File
-- # Clear the clipboard so the 'repeat until isReady ...' loop works properly.
set the clipboard to ""
-- # Copy picture of selected area to the clipboard, press: ⌃⇧⌘4
-- # Note that on my system I need to keystroke '$' instead of '4'.
@rw3iss
rw3iss / .bash_aliases
Last active October 24, 2022 06:08
.profile
View .bash_aliases
source ~/.profile/.bash_aliases
@rw3iss
rw3iss / new_workspace_defaults.json
Last active October 23, 2022 01:10
new_workspace_defaults.json
View new_workspace_defaults.json
{
"folders": [
{
"name": "docs",
"path": "_docs"
},
{
"name": "api",
"path": "api"
},
@rw3iss
rw3iss / sftp.config
Last active October 16, 2022 17:32
sftp.config
View sftp.config
{
"name": "ryanweiss.net",
"host": "144.202.51.193",
"protocol": "sftp",
"port": 22,
"username": "rw3iss",
"password": "",
"remotePath": "/home/rw3iss/_sync/Notes",
"uploadOnSave": true,
"useTempFile": false,
@rw3iss
rw3iss / .aliases
Last active December 9, 2022 09:10
.aliases
View .aliases
#alias reload="source ~/.bashrc";
alias reload="exec zsh -l"
alias aliases="cd ~/profile && code . && cd -"
#alias alias=aliases
# Path shortcuts:
alias .='cd ~'
alias h='cd ~'
alias ~='cd ~'
alias ..='cd ..'
@rw3iss
rw3iss / keybindings.json
Last active December 6, 2022 21:38
keybindings.json
View keybindings.json
// Place your key bindings in this file to override the defaults
[
{
"key": "cmd+ctrl+t",
"command": "editor.action.insertSnippet",
"when": "editorHasSelection",
"args": {
"langId": "javascript",
"name": "Wrap in try/catch"
}
@rw3iss
rw3iss / getInnerError.ts
Created August 9, 2022 03:22
getInnerError
View getInnerError.ts
// Finds the inner most
export const getInnerError = (e) => {
const _getInner = (_e) => {
if (!_e) return undefined;
if (typeof _e == 'string') return _e;
return _getInner(_e.error) || _getInner(_e.data) || _getInner(_e.response) || _getInner(_e.message);
};
return _getInner(e) || 'Unknown error.';
@rw3iss
rw3iss / cpp.snippets.json
Last active December 6, 2022 21:38
snippets.json
View cpp.snippets.json
{
// Place your snippets for cpp here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Generate class header": {
"prefix": "cls",
"body": [
"#pragma once",
@rw3iss
rw3iss / settings.json
Last active December 7, 2022 06:17
settings.json
View settings.json
{
"window.zoomLevel": 1,
"window.title": "${dirty} ${folderPath} 💠 ${activeEditorMedium} 🔷 ${rootName} ",
"explorer.autoReveal": true,
"explorer.autoCollapse": false,
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"explorer.compactFolders": true,
"workbench.layoutControl.enabled": true,
"workbench.list.smoothScrolling": true,