Skip to content

Instantly share code, notes, and snippets.

@Rhynorater
Rhynorater / docker-compose.yaml
Created December 6, 2023 20:10
CTBBPodcast WordPress Testing Environment
version: "3.8"
# NOTE! This docker container has hard-coded values for passwords - this is intentional as this is testing machine. DO NOT EXPOSE TO THE INTERNET.
services:
database:
image: mariadb:10.6.4-focal
restart: unless-stopped
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: 'CTBB_ROOT_PASSWD'
@zulhfreelancer
zulhfreelancer / install-docker.md
Last active May 9, 2024 02:33
Install Docker oneliner script

Just install Docker

$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

Install Docker and Rancher Server

$ curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh && sudo docker run -d --restart=unless-stopped -p 8080:8080 rancher/server

@dsample
dsample / README.md
Last active May 9, 2024 02:26
ASCII art diagrams

ASCI art characters for creating diagrams

Characters:

Single line

  • ASCII code 191 = ┐ ( Box drawing character single line upper right corner )
  • ASCII code 192 = └ ( Box drawing character single line lower left corner )
  • ASCII code 193 = ┴ ( Box drawing character single line horizontal and up )
  • ASCII code 194 = ┬ ( Box drawing character single line horizontal down )
@fnky
fnky / ANSI.md
Last active May 9, 2024 02:21
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@leobeeson
leobeeson / mongodb_6_on_wsl2_ubuntu_2204.md
Last active May 9, 2024 02:19
Installation of MongoDB 6.0 on WSL2 Ubuntu 22.04

Installation of MongoDB 6.0 on WSL2 Ubuntu 22.04

Installed MongoDB using the following guide: Install MongoDB

However, the installation in the guide is for MongoDB 5.0 on WSL with Ubuntu 20.04 (focal) distro.

The following is an adaptation of the guide for installing MongoDB 6.0 on WSL with Ubuntu 22.04 jammy distro.

  1. Open your WSL terminal (ie. Ubuntu) and go to your home directory:: cd ~
  2. Update your Ubuntu packages: sudo apt update

Issues with FreeCAD's Python API in general

  • Document objects are mixed with other attributes in App.ActiveDocument. I would suggest to use doc instead of App.ActiveDocument and e.g. objs.Box instead of App.ActiveDocument.Box. doc.Objects would continue to be the list of children.
  • App.Rotation takes angle(s) in degrees as input but Rotation.Angle is in radians.
  • App.Quantity.getValueAs returns a unit-less quantity instead of a float
  • getGlobalPlacement does not return the global placement.
  • App.GuiUp is not available at the start of FreeCAD.
  • FreeCAD has it's own PySide but not under a different name.
  • There are several way to import FreeCAD (import FreeCAD as App and import freecad as App) but they are not equivalent.
@w121211
w121211 / spikes.ipynb
Last active May 9, 2024 02:15 — forked from jkibele/spikes
Identifying Spikes in timeseries data with Pandas
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dkorobtsov
dkorobtsov / Add_WindowsDefender_Exclusions.ps1
Last active May 9, 2024 02:10
PowerShell script to add Windows Defender exclusions for WSL2 and JetBrains IDE performance issues
# PowerShell script to add Windows Defender exclusions for WSL2 and JetBrains IDE performance issues
#
# For context please read this thread:
# https://github.com/microsoft/WSL/issues/8995
#
# How to use?
# - Save the Script: Open a text editor like Notepad and paste the PowerShell script into it.
# - Save the file with a .ps1 extension, for example, Add_WindowsDefender_Exclusions.ps1.
# - Run PowerShell as Administrator: Search for "PowerShell" in the Start menu, right-click on it, and choose "Run as administrator".
# - Navigate to the Script's Location: Use the cd command to navigate to the directory where you saved the .ps1 file.
@BeattieM
BeattieM / API Contract Example Spec.md
Last active May 9, 2024 02:10
An example of an API contract between the server and front-end devices

#Users

  • User object
{
  id: integer
  username: string
  email: string
  created_at: datetime(iso 8601)
  updated_at: datetime(iso 8601)
}