Skip to content

Instantly share code, notes, and snippets.

View TechStudent10's full-sized avatar
💻
doing stuff

TechStudent10 TechStudent10

💻
doing stuff
View GitHub Profile
@TechStudent10
TechStudent10 / restart.py
Last active August 2, 2022 17:46
A Python script that restarts another Python script when it detects changes in it.
import os, sys, platform
currentFile = ""
while currentFile == "" or currentFile == None:
currentFile = input("What is the file: ")
currentInfo = ""
def check():
global currentFile
@gaearon
gaearon / index.html
Last active January 26, 2024 11:25
Add React in One Minute
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@zkat
zkat / index.js
Last active March 10, 2024 14:32
npx is cool
#!/usr/bin/env node
console.log('yay gist')
@nepsilon
nepsilon / python-how-to-print-the-full-traceback-without-exiting-the-program.md
Created January 3, 2017 06:24
Python: How to print the full traceback without exiting the program? — First published in fullweb.io issue #81

Python: How to print the full traceback without exiting the program?

The exception handling block except Exception as ex: print(ex) will only print the exception message and not its traceback.

That’s good to know, but we need more info than this to debug properly. Namely the line that raised the exception, together with its stack trace.

The traceback module, part of the stdlib, will help us with this:

@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active April 24, 2024 05:16
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings