Skip to content

Instantly share code, notes, and snippets.

View cherylli's full-sized avatar

Cheryl M cherylli

  • Australia
  • 03:03 (UTC +10:00)
View GitHub Profile
@cherylli
cherylli / GitHub-Forking.md
Created September 22, 2022 06:05 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@cherylli
cherylli / substitution.c
Created November 24, 2020 10:57
CS50x 2020 Problem Set 2 Substitution
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include "cs50.h"
int main(int argc, string argv[])
{
if (argc < 2)
{
@cherylli
cherylli / gist:87d8822fb068ad2f54784188015cb1ec
Created January 3, 2020 09:53 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@cherylli
cherylli / markdown-text-101.md
Created December 20, 2019 09:28 — forked from almeidx/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

@cherylli
cherylli / regex_strip.py
Created September 18, 2019 04:03
Automate the Boring Stuff with Python Chapter 7 - Regex Version of strip()
import re
def regex_strip(str, arg=None):
if arg is None:
return re.sub(r'\s+|\s+$', "", str)
else:
return re.sub(r'{0}'.format(arg), "", str)
@cherylli
cherylli / strong-password-test.py
Created September 16, 2019 12:00
Automate the Boring Stuff with Python, Chaper 7 Practice Project, Strong Password Detection
import unittest
from strong_password_detection import isStrongPassword
# A strong password is defined as one that is
# at least eight characters long,
# contains both uppercase and lowercase characters,
# and has at least one digit.
class TestStrongPasswords(unittest.TestCase):
@cherylli
cherylli / table-printer.py
Last active August 30, 2019 12:12
Automate the Boring Stuff with Python, Chaper 6 Practice Project, PrintTable
def printTable(table):
col_widths = getLongestWordLength(table)
for i in range(len(table[0])):
for j in range(len(table)):
print(table[j][i].rjust(col_widths[j]), end=' ')
print()
def getLongestWordLength(table):
return[max([len(item) for item in line]) for line in table]
@cherylli
cherylli / fantasy-game-inv.py
Created August 28, 2019 12:22
Automate the Boring Stuff with Python Chapter 5 Practice Projects - Fantasy Game Inventory
def displayInventory(inv):
print("Inventory: ")
total = 0
for item, quantity in inv.items():
print(f'{quantity} {item}')
total += quantity
print(f'Total number of items: {total}')
def addToInventory(inventory, addedItems):