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
def login(): | |
print('Welcome to the eHealth program, please sign in') | |
with open ('users.csv') as csvfile: | |
database = csv.DictReader(csvfile) | |
loggedin = False | |
while loggedin != True: | |
Username = input('Fill in your username: ') | |
Password = input('Fill in your password: ') | |
for row in database: |
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
.pointer-cursor { | |
cursor: pointer; | |
} | |
#people-table { | |
table-layout: fixed; | |
} | |
#filter { | |
margin: 0; |
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
var cycles = 5, range = 60, | |
shadows = [], y = 0; | |
for (var i=0; i<cycles*360; i+=5.4) { | |
var x = Math.floor(Math.sin(i/3 * (Math.PI/180)) * range), | |
color = 'hsl('+(i%360).toFixed(1)+', 100%, 50%)'; | |
shadows.push([x+'px', (y++)+'px', color].join(' ')); | |
} | |
var css = "font-size: 40px; text-shadow: "+shadows.join(','); | |
console.log('%cDidn\'t know you could do this, did you?'+(new Array(Math.ceil(cycles*1.5))).fill('\n').join(''), css) |
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
// minified code for pasting into a bookmarklet: | |
javascript:(function(){var a="https://web.archive.org/web/";if(window.loadTimeData)location.href=a+window.loadTimeData.data_.summary.failedUrl;else document.location=a+document.location})() | |
// full, unminified code with comments | |
/** | |
* Summary: | |
* Append the current location URL to a base Archive.org Wayback Machine URL and navigate there | |
* | |
* Example: |
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
/** | |
* Recursively print a binary tree data structure | |
* @param {function} printFn function used to print output; called with a single string argument | |
* @param {object} node current node object | |
* @param {string|function} leftKey name of current node's left child property, or a function that accepts the | |
* current node and returns the left child node | |
* @param {string|function} rightKey name of current node's right child property, or a function that accepts the | |
* current node and returns the right child node | |
* @param {string|function} displayKey property to display, or a function that returns a display string | |
* @param {string} [indent=''] current indentation string; mostly used to build up indentation across levels |
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
/** | |
* Implementing Boolean Logic in the Lambda Calculus: A JavaScript Demo | |
* | |
* (Inspiration: https://youtu.be/eis11j_iGMs) | |
* | |
* It turns out that it's entirely possible in the lambda calculus to define | |
* the Boolean values TRUE and FALSE in functional terms as lambdas, which | |
* is pretty cool. | |
* | |
* Once you've done that, it's also possible to define the Boolean operators as |
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
""" | |
Custom evironment setup for the python interpreter | |
Usage: | |
1. Save to ~/.pythonrc (name doesn't matter, *rc is just convention) | |
2. Point the PYTHONSTARTUP environment variable to your file; e.g. for bash, add | |
the following to your ~/.bashrc or ~/.profile: | |
export PYTHONSTARTUP=~/.pythonrc | |
""" |
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
if $SSH_CONNECTION | |
colo torte | |
endif | |
syntax on | |
filetype plugin on | |
" stop trying to be vi; you're vim, goddammit, start acting like it! | |
set nocompatible |
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
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# User specific aliases and functions | |
alias ls="ls --color=auto" | |
alias l=ls | |
alias ll="ls -l" | |
alias la="ls -a" |
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
# simple aliases | |
alias gA="git add -A" | |
alias gc="git commit" | |
alias gcm="git commit -m" | |
alias gcam="git commit -am" | |
alias gcp="git cherry-pick" | |
alias gcob="git checkout -b" | |
alias gb="git branch --show-current" | |
alias gp="git push" |
OlderNewer