sudo yum -y update
I'm not a big fan of their default bash prompt:
echo "export PS1='[\D{%F %T}]\n\[\e]0;\w\a\]\[\e[32m\]\u:\[\e[33m\]\w\[\e[0m\]\n\$ '" >> ~/.bashrc
source ~/.bashrc
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa |
# what is Pascal's triangle? | |
# https://en.wikipedia.org/wiki/Pascal%27s_triangle | |
number_of_rows = 11 | |
def print_triangle_row(rows:int, current_row:int): | |
one_line= "" | |
# iterate on current_line |
/** | |
* Delete a row by number | |
* | |
* @param integer rowNumber - row number show be excluded | |
* @param integer numOfRows - number of lines | |
* @return void | |
*/ | |
deleteRow : function(rowNumber, numOfRows) { | |
// Id | |
var id = $(this).prop('id'); |
Create a repo. Make sure there is at least one file in it (even just the README) Generate ssh key:
ssh-keygen -t rsa -C "your_email@example.com"
Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings. Test SSH key:
ssh -T git@github.com
If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.
Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.
If in doubt about what git is doing when you run these commands, just
import random | |
magic_numbers = [random.randint(0,9), random.randint(0,9)] | |
#print(magic_numbers) | |
chances = 3 | |
input_usernumber_message = "This is attempt {}. Enter a number between 0 and 9: " | |
for attempt in range(chances): # based on initial value, it can be [0,1,2] |
import random | |
min_value_list = 0 | |
max_value_list = 9 | |
number_elements_list = 2 | |
def initially_magic_numbers_list(min_value, max_value, number_of_elements): | |
return [random.randint(min_value,max_value) for how_many_elements in range(number_of_elements)] |
__author__ = 'gerardo' | |
def gcd(m, n): | |
while m % n != 0: | |
oldm = m | |
oldn = n | |
m = oldn | |
n = oldm % oldn |
__author__ = 'gerardo' | |
from random import randint | |
#alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', | |
# 'v', 'w', 'x', 'y', 'z', ' '] | |
alphabet2 = 'abcdefghijklmnopqrstuvwxyz ' | |
theGoalString = 'methinks it is like a weasel' # just put text you want the monkey to guess |