Skip to content

Instantly share code, notes, and snippets.

@PurpleVibe32
PurpleVibe32 / vmwk17key-5000keys-unchecked.txt
Created February 21, 2023 19:28
5000k+ vmware workstation pro 17 (untested)
4U612-DN31H-MJEJ0-0V0Z4-978HD
5G44H-ACH50-0J4C9-1VC5P-CY0QD
JC000-8G047-MJDF1-0H3E6-8QR5F
JV2NU-0XL5N-0J4Q8-0T0E6-8GH56
JZ6E0-4R1E0-HJ1Q0-1R8NH-3AK28
0Z48K-4X29Q-MJE80-113GK-C7K3A
HF4H0-46K80-MJ8D9-1KAZP-CKK12
NY69H-2N05P-HJ170-1V1ZM-CG222
4C45A-D8J0H-HJ5T0-1T25H-92A76
0Z4H2-0WK9K-4JE10-0T9G6-9C8M4
@dario2994
dario2994 / generate_hcn.py
Last active May 2, 2024 04:12
Highly composite numbers list
#!/usr/bin/env python3
# This program prints all hcn (highly composite numbers) <= MAXN (=10**18)
#
# The value of MAXN can be changed arbitrarily. When MAXN = 10**100, the
# program needs less than one second to generate the list of hcn.
from math import log
MAXN = 10**18
@phucnm
phucnm / gist:59599cf4bae05bed284b
Created February 29, 2016 05:06
Record video from camera with AVAssetWriter
Sometimes, for some reason, you have to use AVAssetWriter to record videos from camera instead of using movile file output.
I had experienced some issue by that recording method due to lacking of tutorial and SO questions :))
Noted for everyone who met the issue: black first frame
if (CMSampleBufferDataIsReady(sampleBuffer)) {
if (videoWriter.status != AVAssetWriterStatusWriting) {
CMTime startTime = CMSampleBufferGetPresentationTimeStamp(sampleBuffer);
[videoWriter startWriting];
[videoWriter startSessionAtSourceTime:startTime];
@oscarychen
oscarychen / postgres_ltree.sql
Created March 11, 2023 02:07
Postgres Ltree Cheatsheet
CREATE EXTENSION ltree;
CREATE TABLE test (path ltree);
-- Top
-- / | \
-- Science Hobbies Collections
-- / | \
-- Astronomy Amateurs_Astronomy Pictures
@stargieg
stargieg / mikrotik-dynv6
Last active May 2, 2024 04:07
Mikrotik dyndns for dynv6.com
# Define User Variables
:global ddnspass "TOKEN"
:global ddnshost "HOSTNAME.dynv6.net"
#:global ddnspool "pool0"
#:global ddnsinterface "bridge"
#:global ddnsinterface "6to4-henet"
#:global ddnsinterface "pppoe-out1"
#:global ddnsinterface "ether1"
# Define Global Variables
@code-boxx
code-boxx / 0-PY-UPLOAD-DB.MD
Last active May 2, 2024 04:02
Upload File To Database In Python Flask

PYTHON FLASK UPLOAD FILE INTO DATABASE

https://code-boxx.com/python-flask-upload-file-database/

NOTES

  1. Run unpack.bat (Windows) unpack.sh (Linux/Mac). This will automatically:
    • Create templates and static folders.
    • Move 2-upload.html into templates.
    • Move x-dummy.css into static
    • Download dummy image below.
  • Create a virtual environment - virtualenv venv
@igorjs
igorjs / rest-api-response-format.md
Last active May 2, 2024 03:53
REST API response format based on some of the best practices
@kenmori
kenmori / styled-components-howtouse.md
Last active May 2, 2024 03:48
styled-componentsの使い方(パッとわかりやすく、色々なパターンを説明することを目指しています)

styled-componentsの使い方(パッとわかりやすく、色々なパターンを説明することを目指す記事)

styled-compoents

本家ドキュメント

こちらはStyled-componentsの使い方、ユースケースを集めた端的なページです。
なにかの問題解決、参考になりましたらスターを押してくださいませ。励みになります。
@fnky
fnky / ANSI.md
Last active May 2, 2024 03:47
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active May 2, 2024 03:47
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