Skip to content

Instantly share code, notes, and snippets.

@amullins83
amullins83 / README.md
Last active March 29, 2024 11:43
A simple command-line progress bar in C

#Progress in C

This is in an example meant to present some ideas regarding command-line progress bars in C.

##Important parts

The main idea is to overwrite stdout with new information every time a particular step is reached. I accomplished this using the VT100 emulator hack from [this Stack Overflow answer][1]. In a nutshell, printing ^[[2K to stdout erases the current line, but it doesn't necessarily move the cursor to the start. Printing \r does that. Also, I decided I wanted to print a newline character after the progress indicator, but I need to get rid of that newline on the next print. That's what \b does: it inserts a backspace, deleting the last character printed.

Also important is the call to fflush, which will guarantee that the print operation completes and is visible before the program moves on to its next task (see [this Stack Overflow answer][2]).

@rambabusaravanan
rambabusaravanan / detect-js-framework.js
Last active March 29, 2024 11:39
Detect JS Framework used in a Website
// Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I)
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]') ||
Array.from(document.querySelectorAll('*')).some(e => e._reactRootContainer !== undefined || Object.keys(e).some(k => k.startsWith('__reactContainer')))
)
console.log('React.js');
if(!!document.querySelector('script[id=__NEXT_DATA__]'))
console.log('Next.js');
@ih2502mk
ih2502mk / list.md
Last active March 29, 2024 11:38
Quantopian Lectures Saved
@vmarcosp
vmarcosp / .gitignore
Created July 14, 2022 21:10
.gitignore for Next.js and ReScript
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
@noamtamim
noamtamim / README.md
Last active March 29, 2024 11:36
Markdown with PlantUML

How to use PlantUML with Markdown

PlantUML is a really awesome way to create diagrams by writing code instead of drawing and dragging visual elements. Markdown is a really nice documentation tool.

Here's how I combine the two, to create docs with embedded diagrams.

Step 0: Setup

Get the command-line PlantUML from the download page or your relevant package manager.

@sxiii
sxiii / p2p-vpns.md
Created September 10, 2021 07:13
P2P VPN List

An guide how to activate Windows 11 Pro for free

Why?

Because you will get some more features like an Bitlocker and host your device as an External Desktop which can be accessed through the internet

Am i also able to switch from any other edition to Pro?

The answer is yes! You can switch from almost any edition to Pro completely for free!

Note for users with unactivated Pro edition

People which already have Pro, but not activated, can skip to this step.

Getting started

What you first need to do is open CMD (Command Prompt) as Administrator using this keyboard key:

@Namburger
Namburger / tflite_cv_objdetect.py
Last active March 29, 2024 11:31
An example with opencv/tflite object detection combo
import os
import argparse
import cv2
import numpy as np
import sys
import time
import importlib.util
from tflite_runtime.interpreter import Interpreter
from tflite_runtime.interpreter import load_delegate