Skip to content

Instantly share code, notes, and snippets.

//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.5.0 <0.9.0;
contract Lottery {
address payable[] public players;
address public manager;
@eg180
eg180 / Update-branch.md
Created October 21, 2020 16:38 — forked from whoisryosuke/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

Get Latest Code Version - Git

Case 1: Don’t care about local changes

  • Solution 1: Get the latest code and reset the code
git fetch origin
git reset --hard origin/[tag/branch/commit-id usually: master]
@eg180
eg180 / terminal-cheat-sheet.txt
Created September 2, 2020 23:18 — forked from cferdinandi/terminal-cheat-sheet.txt
Terminal Cheat Sheet
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@eg180
eg180 / hangmanwordbank.py
Created April 6, 2020 02:39 — forked from chrishorton/hangmanwordbank.py
Hangman ascii art and wordbank
HANGMANPICS = ['''
+---+
| |
|
|
|
|
=========''', '''
+---+
@eg180
eg180 / PY0101EN-1-1-Types.ipynb
Created March 4, 2020 01:46
Created on Cognitive Class Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eg180
eg180 / Guess#.py
Created June 26, 2019 22:43 — forked from cguldner/Guess#.py
A simple number game that I built using python
import random #bring in the random number
import time
number=random.randint(1, 200) #pick the number between 1 and 200
def intro():
print("May I ask you for your name?")
name=input() #asks for the name
print(name + ", we are going to play a game. I am thinking of a number between 1 and 200")
time.sleep(.5)
print("Go ahead. Guess!")