Skip to content

Instantly share code, notes, and snippets.

View 0livare's full-sized avatar

Zach Olivare 0livare

View GitHub Profile
@0livare
0livare / .gitconfig
Created August 26, 2015 16:23
Using Meld with Git
[diff]
tool = meld
[difftool]
prompt = false
[difftool "meld"]
path = C:\\Program Files (x86)\\Meld\\Meld.exe
[merge]
tool = meld
[mergetool "meld"]
[
{ "keys": ["f11"], "command": "htmlprettify"},
{ "keys": ["ctrl+space"], "command": "replace_completion_with_auto_complete", "context":
[
{ "key": "last_command", "operator": "equal", "operand": "insert_best_completion" },
{ "key": "auto_complete_visible", "operator": "equal", "operand": false },
{ "key": "setting.tab_completion", "operator": "equal", "operand": true }
]
},
{
"added_words":
[
"Posten",
"Ribbich"
],
"font_size": 11,
"spell_check": true,
@0livare
0livare / .bashrc
Last active August 10, 2016 14:14
Modified bashrc to add several aliases outside of the 'git' command
#!/bin/bash
# Start the SSH Agent process
eval `ssh-agent -s`
# Add your ssh keys
ssh-add ~/.ssh/id_rs
# Set aliases
alias k='git'
# Auto-complete for 'k' as well
@0livare
0livare / git-move
Last active August 14, 2018 13:54
Move a local branch to a different commit
#!/bin/bash
# FOR ANYONE READING THIS, simply use 'git branch -f`, it even has the same syntax as this script
# If there are 0 or 1 arguments
if [ $# -eq 0 ] || [ $# -eq 1 ]
then
echo "Usage: git move <BRANCH-NAME> <BRANCH-POINTER>"
exit 1
fi
@0livare
0livare / .gitconfig
Last active July 8, 2024 04:07
My git alias list. Running 'git alias' will pretty-print these commands to the terminal.
# Some options that may or may not be applicable to you
[user]
name = Zach Olivare
email = [email protected]
[push]
default = upstream
[core]
autocrlf = input # Force replacing CRLF line endings with LF
ignorecase = false
# editor = code --wait
@0livare
0livare / History|-10d9a|entries.json
Last active May 16, 2022 16:02
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/zposten/dev/skyslope-react-document-viewer/lib/src/components/SinglePdfViewer/useSingleDocumentContext.ts","entries":[{"id":"GuIh.ts","source":"searchReplace.source","timestamp":1651686692925},{"id":"LFbj.ts","source":"moved.source","timestamp":1651686713107},{"id":"2EoS.ts","source":"searchReplace.source","timestamp":1651693436053},{"id":"nO9W.ts","source":"Renaming PdfViewerState","timestamp":1651694116007},{"id":"Yy21.ts","timestamp":1651761245035},{"id":"FIkm.ts","timestamp":1651761279580},{"id":"Balb.ts","timestamp":1651761324756},{"id":"mGuN.ts","timestamp":1651761375222},{"id":"prNY.ts","timestamp":1651761422121},{"id":"9Xks.ts","timestamp":1652114517503}]}
@0livare
0livare / file-structure.txt
Last active March 15, 2019 15:31
A textual description of a file structure
├── LICENSE
├── README.md
├── gatsby-config.js
├── gatsby-node.js
├── node_modules
├── package-lock.json
├── package.json
├── src
│ ├── layouts
│ ├── pages
// Interview question:
//
// What is a linked list? Implement one in JavaScript without
// using an array. (I did this in about ten minutes)
//
// What is the time complexity of add()? How can you make it O(1)?
class Node {
constructor(value) {
this.value = value
class Node {
constructor(value) {
this.value = value
}
}
class Tree {
add(node) {
if (!this.root) {
this.root = node