"zip": "rm -f project.zip && zip -r project.zip . -x 'node_modules/*' '.git/*' '.next/*'"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -type d \( -name "node_modules" -o -name ".next" -o -name ".git" -o -name "dist" \) -prune -o -print | awk -F/ '{print substr($0, 2, length($0)-1)}' > directory_structure.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pygame as pg | |
| pg.init() | |
| y, step, head = segments = [15, 16, 17] | |
| n, apple = step, 99 | |
| screen = pg.display.set_mode([225] * 2, pg.SCALED) | |
| score = 0 | |
| while segments.count(head) % 2 * head % n * (head & 240): | |
| for e in pg.event.get(768): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void multiply(int number) | |
| { | |
| number *= 2; | |
| } | |
| void add(ref int number) | |
| { | |
| number += 1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from tkinter import * | |
| from tkinter.ttk import * | |
| from time import strftime | |
| # creating window | |
| window = Tk() | |
| window.title('Clock') | |
| # create label |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| setTimeout(() => { | |
| console.log("timeout 1") | |
| Promise.resolve().then(() => { | |
| console.log("p1") | |
| }) | |
| }, 0) | |
| setTimeout(() => { | |
| console.log("timeout 2") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Node: | |
| def __init__(self, value): | |
| self.value = value | |
| self.next = None | |
| class LinkedList: | |
| def __init__(self, head=None): | |
| self.head = head |
this command set alias for git add -A to git a:
git config --global alias.a 'add -A'
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import random | |
| # choices in game. r=rock, p=paper, s=scissors | |
| choices = ['r', 'p', 's'] | |
| # get user input | |
| userChoice = input('Choose your weapon [r]ock, [p]aper, or [s]cissors: ') | |
| if userChoice not in choices: | |
| print('Invalid input') |
NewerOlder