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
| # This should be symlinked or added to ~/.zshrc_personal | |
| ß | |
| # This alias works on a local machine | |
| alias pr='open "https://github.com/$(git remote get-url origin | sed -E "s/.*:(.+)\/(.+).git/\1\/\2/")/pull/new/$(git rev-parse --abbrev-ref HEAD)"' | |
| # but over SSH we can alias `open` to the script below | |
| alias open='~/copy.sh' |
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
| # Set prefix to ^S | |
| unbind C-b | |
| set -g prefix ^S | |
| bind C-s send-prefix | |
| # split windows like vim | |
| # vim's definition of a horizontal/vertical split is reversed from tmux's | |
| bind-key s split-window -v -c "#{pane_current_path}" | |
| bind-key v split-window -h -c '#{pane_current_path}' |
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 | |
| LAST_URL="" | |
| # Function to check if the frontmost app is Chrome | |
| should_ignore() { | |
| front_app=$(osascript -e 'tell application "System Events" to get name of first application process whose frontmost is true') | |
| [[ "$front_app" == "Google Chrome" || "$front_app" == "Slack" || "$front_app" == "Safari" ]] | |
| } |
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
| alias pr='open "https://github.com/$(git remote get-url origin | sed -E "s/.*:(.+)\/(.+).git/\1\/\2/")/pull/new/$(git rev-parse --abbrev-ref HEAD)"' |
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
| brew tap homebrew/cask-fonts | |
| brew install font-bigblue-terminal-nerd-font font-bitstream-vera-sans-mono-nerd-font font-blex-mono-nerd-font font-caskaydia-cove-nerd-font font-code-new-roman-nerd-font font-comic-shanns-mono-nerd-font font-cousine-nerd-font font-daddy-time-mono-nerd-font font-dejavu-sans-mono-nerd-font font-droid-sans-mono-nerd-font font-envy-code-r-nerd-font font-fantasque-sans-mono-nerd-font font-fira-code-nerd-font font-fira-mono-nerd-font font-firgenerd font-go-mono-nerd-font font-gohufont-nerd-font font-hack-nerd-font font-hackgen-nerd font-hasklug-nerd-font font-heavy-data-nerd-font font-hurmit-nerd-font font-im-writing-nerd-font font-inconsolata-go-nerd-font font-inconsolata-lgc-nerd-font font-inconsolata-nerd-font font-intone-mono-nerd-font font-iosevka-nerd-font font-iosevka-term-nerd-font font-jetbrains-mono-nerd-font font-lekton-nerd-font font-liberation-nerd-font font-lilex-nerd-font font-meslo-lg-nerd-font font-monocraft-nerd-font font-monofur-nerd-font font-monoid-nerd-font font-mo |
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 binaryCombos(str){ | |
| var placeholder = "_"; | |
| var result = []; | |
| if (!str.includes(placeholder)){ | |
| result.push(str); | |
| return result; | |
| } | |
| for(var x = 0; x < str.length; x += 1){ | |
| if (str[x] == placeholder){ | |
| result = result.concat(binaryCombos(str.slice(0,x) + "0" + str.slice(x+1))); |
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 binaryStringExpansion = (str) => ( | |
| (str.indexOf('_') === -1) ? | |
| [str] : | |
| binaryStringExpansion(str.replace('_', '0')) | |
| .concat( | |
| binaryStringExpansion(str.replace('_', '1')) | |
| ) | |
| ); |
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 arraySum(arr){ | |
| if (arr.length < 1){ | |
| return 0 | |
| } else if (arr[0].constructor === Array){ | |
| return arraySum(arr[0]) + arraySum(arr.slice(1)) | |
| } else { | |
| return arr[0] + arraySum(arr.slice(1)) | |
| } | |
| } |
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
| $(document).ready(function(){ | |
| //put all the table rows in a variable after page load to pass in to RowClick | |
| var trs = $('#main-table tr') | |
| //bind the click handler to all the table rows | |
| $('tr').on('click', function(){ | |
| //call the RowClick function on click event | |
| RowClick($(this),false,trs) | |
| }) | |
| }) |
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
| from django.conf.urls import url | |
| from . import views | |
| urlpatterns = [ | |
| url(r'^$', views.index) | |
| ] |
NewerOlder