Skip to content

Instantly share code, notes, and snippets.

@CodeWithHarry
CodeWithHarry / Tic-Tac-Toe.py
Created April 30, 2022 05:36
Code for the tic tac toe game we created in this video: https://youtu.be/E8fmDDtaHLU on CodeWithHarry channel on YouTube
def sum(a, b, c ):
return a + b + c
def printBoard(xState, zState):
zero = 'X' if xState[0] else ('O' if zState[0] else 0)
one = 'X' if xState[1] else ('O' if zState[1] else 1)
two = 'X' if xState[2] else ('O' if zState[2] else 2)
three = 'X' if xState[3] else ('O' if zState[3] else 3)
four = 'X' if xState[4] else ('O' if zState[4] else 4)
five = 'X' if xState[5] else ('O' if zState[5] else 5)
@rafaeltuelho
rafaeltuelho / openshift-cheatsheet.md
Last active May 18, 2024 05:03
My Openshift Cheatsheet

My Openshift Cheatsheet

Project Quotes, Limits and Templates

  • Cluster Quota
oc create clusterquota env-qa \
    --project-label-selector environment=qa \
    --hard pods=10,services=5
    
oc create clusterquota user-qa \
@gd3kr
gd3kr / script.js
Created February 15, 2024 06:30
Download a JSON List of twitter bookmarks
/*
the twitter api is stupid. it is stupid and bad and expensive. hence, this.
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes.
When finished, it downloads a JSON file containing the raw text content of every bookmark.
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please?
*/
@dylan-k
dylan-k / filename-firstline.sh
Created September 12, 2013 00:55
rename each text file according to its first line of text
#A shell script that will rename all the text files in a directory
#each file will be named with the first line of text from that file
for file in *
do
# Avoid renaming diretories!
if [ -f "$file" ]
then
newname=`head -1 $file`
if [ -f "$newname" ]
@GusAntoniassi
GusAntoniassi / README.md
Last active May 18, 2024 04:18
Configure autocompletion to kubectl with zsh

kubectl with ZSH (oh-my-zsh)

How to configure

Use the following commands to add the kubectl autocomplete to zsh:

mkdir -p ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/
kubectl completion zsh > ~/.oh-my-zsh/custom/plugins/kubectl-autocomplete/kubectl-autocomplete.plugin.zsh
@cxmeel
cxmeel / MD_BUTTONS_DOCS.md
Last active May 18, 2024 04:07
Documentation for markdown buttons.

Markdown Buttons

A collection of SVG buttons for displaying custom "buttons" in Markdown content. You are free to use these buttons wherever you like. All buttons were created in Figma, with (most) icons provided by the Iconify plugin.

Sponsor on GitHub View Itch.io Store

The SVG files can be found on this gist. They have been separated in order to reduce the amount of lag when loading this README file.

@rebane2001
rebane2001 / plot_discord_predictions.py
Created May 18, 2024 00:18
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
"""
Simple script to plot your Discord machine-learning predicted age and gender from the data dump.
To use, simply put this script in your activity/analytics/ folder of your Discord data dump and run it.
You may need to install matplotlib first:
pip install -U matplotlib
thrown together by rebane2001
"""
@piyushgarg-dev
piyushgarg-dev / README.md
Last active May 18, 2024 03:56
Kafka Crash Course