This file contains 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 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 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 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 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 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 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) | |
] |
This file contains 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.shortcuts import render, HttpResponse | |
def index(request): | |
return HttpResponse('Hello World') |
This file contains 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 generate_link_list(max_val){ | |
var head = new Node(1); | |
for (var x = 2; x <= max_val; x+=1){ | |
var curr_node = head; | |
while(curr_node.next != null){ | |
curr_node = curr_node.next; | |
} | |
curr_node.next = new Node(x); | |
} | |
return head |