Skip to content

Instantly share code, notes, and snippets.

@chris2k20
chris2k20 / Proxmox-Cloudinit.sh
Last active April 18, 2024 15:08
Proxmox Cloud-Init Template Creation Bash-Script (Ubuntu)
#!/bin/bash
# Creates a Ubuntu Cloud-Init Ready VM Template in Proxmox
#
# Update the image name and URL for Ubuntu 22.04 LTS
export IMAGENAME="jammy-server-cloudimg-amd64.img"
export IMAGEURL="https://cloud-images.ubuntu.com/jammy/current/"
export STORAGE="local-zfs-cache"
export VMNAME="ubuntu-2204-cloudinit-template"
export VMID=902204
function Mutilator(data, name, context) {
this.n = name || `mutilation-${+new Date()}`;
this.d = data;
this.c = context || window;
this.isArr = function(p) {
return this.d[p].constructor == Array;
};
this.dispatch = function(p, v, t) {
this.c.dispatchEvent(
new CustomEvent(this.n, {
@ashelex
ashelex / umb.md
Last active April 18, 2024 15:07
Universal Studios API Unofficial Documentation
@matthewzring
matthewzring / markdown-text-101.md
Last active April 18, 2024 15:07
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

What this guide covers:

Run a local HTTP server with Docker 🐳

Serve your static website from localhost using Docker and Nginx.

By @arrested-developer

Why Docker?

Do you know the famous phrase "it works on my machine"?

@stonehippo
stonehippo / nodejs_raspberry_pi.md
Last active April 18, 2024 15:04
Methods for installing Node.js on Raspberry Pi

Setting Up Node.js On Raspberry Pi

There are several ways that you can set up Node.js on a Raspberry Pi when running Raspbian/Rapberry Pi OS. Depending on your needs, the version of the RPi that you're using, and how you like to manage installs, you have a lot of options.

Node.js from source

Do not do this if you can avoid it, it's super slow. If you insist on doing it and have the time, you can start at https://nodejs.org. But really, don't do this.

If you have tons of time on your hands, don't need Node anytime soon, and insist on building from source for some reason, here's a guide you can try out that covers building Node.js on an ARMv6 Raspberry Pi.

Side note: unless you have a need for the latest and greatest features, I recommend developing using the most recent Long Term Support (LTS) version of Node available, especially for anything you plan to put into production for any length of time.

@PigDogBay
PigDogBay / NextBASICCribSheet.txt
Last active April 18, 2024 15:02
NextBASIC Crib Sheet, Wikitext markup
__NOTOC__
Notes on the Sinclair ZX Spectrum Next [[Retro Gaming]], [[ZX Spectrum]], [[Z80 Assembly Language]]
==Next BASIC==
===Editor===
EXTEND MODE, CAPSLOCK - Start of program<br/>
EXTEND MODE, GRAPHICS - End of program
<pre>
ERASE 100,200 ;Erase lines 100 to 200
LINE 100,2 ;Renumbers lines from 100 in steps of 2, 100, 102, 104, 106...
@heyalexej
heyalexej / pytz-time-zones.py
Created November 16, 2016 09:14
list of pytz time zones
>>> import pytz
>>>
>>> for tz in pytz.all_timezones:
... print tz
...
...
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
@awesomebytes
awesomebytes / to_grayscale.py
Created April 18, 2020 04:08
Node to convert a ROS Image topic publisher from RGB to grayscale (rgb or bgr to mono8) using opencv and cv_bridge
#!/usr/bin/env python
import sys
import rospy
from sensor_msgs.msg import Image
from cv_bridge import CvBridge
import cv2
"""
Node to transform an input Image topic into
@gaearon
gaearon / modern_js.md
Last active April 18, 2024 15:01
Modern JavaScript in React Documentation

If you haven’t worked with JavaScript in the last few years, these three points should give you enough knowledge to feel comfortable reading the React documentation:

  • We define variables with let and const statements. For the purposes of the React documentation, you can consider them equivalent to var.
  • We use the class keyword to define JavaScript classes. There are two things worth remembering about them. Firstly, unlike with objects, you don't need to put commas between class method definitions. Secondly, unlike many other languages with classes, in JavaScript the value of this in a method [depends on how it is called](https://developer.mozilla.org/en-US/docs/Web/Jav