See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
#!/usr/bin/env python3 | |
""" | |
License: MIT License | |
Copyright (c) 2023 Miel Donkers | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
Most new PCs don't come with DVD drives anymore. So it can be a pain to install Windows on a new computer.
Luckily, Microsoft makes a tool that you can use to install Windows from a USB storage drive (or "thumbdrive" as they are often called).
But what if you don't have a second PC for setting up that USB storage drive in the first place?
In this tutorial we'll show you how you can set this up from a Mac.
You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.
import cv2 | |
import numpy as np | |
img = np.zeros((100, 300, 3), dtype=np.uint8) | |
ft = cv2.freetype.createFreeType2() | |
ft.loadFontData(fontFileName='Ubuntu-R.ttf', | |
id=0) | |
ft.putText(img=img, | |
text='Quick Fox', |
const RANDOM_MEMO_SETTINGS = { | |
// Amount of memos to cache | |
memoAmount: 100, | |
// Kinds of memos to cache: PUBLIC = visible to everyone, PROTECTED = logged in users, PRIVATE = only the creator | |
memoKinds: ["PUBLIC", "PROTECTED", "PRIVATE"], | |
// Time in minutes to cache the memos | |
memoCacheTimeMinutes: 60, | |
// Username of the memo creator to filter the memos | |
memoCreatorUsername: "", | |
// Button text |
// define a grammar called Hello | |
grammar Hello; | |
r : 'hello' ID; | |
ID : [a-z]+ ; | |
WS : [ \t\r\n]+ -> skip ; |
var myElement = document.getElementById('IDoftheDIV'); | |
if(window.addEventListener) { | |
// Normal browsers | |
myElement.addEventListener('DOMSubtreeModified', contentChanged, false); | |
} else | |
if(window.attachEvent) { | |
// IE | |
myElement.attachEvent('DOMSubtreeModified', contentChanged); | |
} |
#!/usr/bin/env bash | |
#This script backups selected databases in local MySQL server | |
#REQUIREMENTS | |
##mysqldump gzip | |
##mysql database has no root password. This script uses 'root' MySQL user without password as no 'root' password is set. | |
##This is not good practice. User with more restrictive permission should be used. | |
#set database user |
/* | |
Evaluation Of postfix Expression in C++ | |
Input Postfix expression must be in a desired format. | |
Operands must be integers and there should be space in between two operands. | |
Only '+' , '-' , '*' and '/' operators are expected. | |
*/ | |
#include<iostream> | |
#include<stack> | |
#include<string> |