In this cheatsheet, to simplify, models are represented as JSON.
\{{! code comments }}
# aproducer.py | |
# | |
# Async Producer-consumer problem. | |
# Challenge: How to implement the same functionality, but no threads. | |
import time | |
from collections import deque | |
import heapq | |
class Scheduler: |
const username = "USER_NAME_HERE"; | |
/** | |
* Initialized like this so typescript can infer the type | |
*/ | |
let followers = [{ username: "", full_name: "" }]; | |
let followings = [{ username: "", full_name: "" }]; | |
let dontFollowMeBack = [{ username: "", full_name: "" }]; | |
let iDontFollowBack = [{ username: "", full_name: "" }]; |
"""Helper script to send emails for demo purposes.""" | |
import smtplib | |
import os | |
from email.utils import formatdate | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
from email.mime.base import MIMEBase | |
from email.encoders import encode_base64 | |
from dotenv import load_dotenv |
Install VMWare Workstation PRO 17 (Read it right. PRO!) | |
Also, these keys might also work with VMWare Fusion 13 PRO. Just tested it. | |
Sub to me on youtube pls - PurpleVibe32 | |
if you want more keys - call my bot on telegram. @purector_bot (THE BOT WONT REPLY ANYMORE) - Or: https://cdn.discordapp.com/attachments/1040615179894935645/1074016373228978277/keys.zip - the password in the zip is 102me. | |
--- | |
This gist can get off at any time. | |
PLEASE, DONT COPY THIS. IF YOU FORK IT, DONT EDIT IT. | |
*If you have a problem comment and people will try to help you! | |
*No virus |
// check version | |
node -v || node --version | |
// list locally installed versions of node | |
nvm ls | |
// list remove available versions of node | |
nvm ls-remote | |
// install specific version of node |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
<? | |
/** | |
* Generates a offline-mode player UUID. | |
* | |
* @param $username string | |
* @return string | |
*/ | |
public static function constructOfflinePlayerUuid($username) { | |
//extracted from the java code: | |
//new GameProfile(UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8)), name)); |
#!/usr/bin/env bash | |
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error | |
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) ~/.gnupg/ | |
# Also correct the permissions and access rights on the directory | |
chmod 600 ~/.gnupg/* | |
chmod 700 ~/.gnupg |