Skip to content

Instantly share code, notes, and snippets.

View crisleo94's full-sized avatar
💭
https://brave.com/wjx115

Cristhian Reinoso crisleo94

💭
https://brave.com/wjx115
View GitHub Profile
class Via:
def __init__(self, tipo, numero, sentido='NA'):
self.tipo = tipo
self.numero = numero
self.sentido = sentido
def show(self):
print({
'tipo': self.tipo,
'numero': self.numero,
@crisleo94
crisleo94 / ssh_multikeys.md
Created April 26, 2022 16:56 — forked from jmcaldera/ssh_multikeys.md
Multiple SSH Keys macOS

Multiple SSH Keys on same client

Check if you have existing keys by opening the terminal and entering: ssh-add -l OR ls -al ~/.ssh and check for any file called (usually) id_rsa or similar

Identify the host you're using your current key for. You probably added this key to, for example your github or gitlab account. We will use this later on.

If you don't have a config file on ~/.ssh folder, you will need to create one. We'll get back to this later.

#Parameters
#The script should take 2 arguments $source and $destination (for the source and destination folders).
param([string]$source, [string]$destination)
#Functions
#2) Functions
#Create a function named CheckFolder that checks for the existence of a specific directory/folder that is passed
#to it as a parameter. Also, include a switch parameter named create. If the directory/folder does not exist and
@crisleo94
crisleo94 / Lottery.sol
Created December 14, 2021 11:29
Lottery game with solidity, only the manager can pick a winner
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
contract Lottery {
address public manager_address;
address[] public players;
constructor() {
manager_address = msg.sender;
function prompt {
# get only last folder location
$p = Split-Path -leaf -path (Get-Location)
$user = $env:UserName
$host.UI.RawUI.WindowTitle = "@" + $user + "\" + $p + ">"
$host.UI.RawUI.ForegroundColor = "Blue"
# detect if the current folder is a git repository in order to show the branch
if (Test-Path .git) {
$p = Split-Path -leaf -path (Get-Location)