Skip to content

Instantly share code, notes, and snippets.

// More information: https://danielupshaw.com/openscad-rounded-corners/
module roundedcube_simple(size = [1, 1, 1], center = false, radius = 0.5) {
// If single value, convert to [x, y, z] vector
size = (size[0] == undef) ? [size, size, size] : size;
translate = (center == false) ?
[radius, radius, radius] :
[
radius - (size[0] / 2),
@rmrfslashbin
rmrfslashbin / Darwin.md
Last active December 26, 2024 03:55
Minimal MacOS setup guide. System/UI and CLI (zsh, Oh My Zsh, brew, etc).

Note

Apple will reject apps that are using private url schemes (Ugh, Apple....) if they are pretty much obvius. Some apps are rejected and others are not, so, be aware of this issue before implementing any of those URL's in your app as a feature.

Updates

  • [UPDATE 4] iOS 10 update: apparently settings now can be reached using App-Pref instead of prefs
  • [UPDATE 3] For now you just can use url schemes to open your apps's settings with Swift 3.0 (Xcode 8). I'll keep you informed when OS preferences can be reached
  • [UPDATE 2] The openURL() method of UIApplication is now deprecated. You should use application(_:open:options:) instead
  • [UPDATE 1] Not yet tested in iOS 10. It will fail because of policies changes in URL scheme handling.
@ucarion
ucarion / html_cleanup.rb
Last active December 26, 2024 03:46
Composing programs to PDF
require 'nokogiri'
input = $stdin.readlines.join
page = Nokogiri::HTML(input)
page.css('.example').each do |elem|
elem.inner_html = '<i>Environment diagram omitted.</i>'
end
page.css('img').remove
@rickklaasboer
rickklaasboer / how-to-setup-plex-with-sonarr-radarr-jackett-overseerr-and-qbittorrent-using-docker.md
Last active December 26, 2024 03:41
How to setup Plex with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent using Docker

How to setup Plex with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent using Docker

Before continuing: This guide is currently outdated but I'm working on a new one with upgrading steps included. I'll link it here once it's finished :)

This is a guide that will show you how to setup Plex Media Server with Sonarr, Radarr, Jackett, Overseerr and qBitTorrent with Docker. It is written for Ubuntu 20.04 but should work on other Linux distributions as well (considering supported distributions by Docker). It is also written for people who have some experience with Linux and Docker. If you are new to Docker, I recommend you to read the Docker documentation, and if you are new to Linux, I recommend you to read the Ubuntu documentation.

Now, let's get started!

Please note: This guide was written without considering hardlinking for Sonarr/Radarr. If you want to use hardlinking refer to #Hardlinking

@cobaltp
cobaltp / conv.ps1
Last active December 26, 2024 03:36
Extract Heaven Burns Red audio cache files to wav file
$workdir = Get-Location
$tempdir = Join-Path $workdir temp
$outputdir = Join-Path $workdir output
$hbrdir = "C:\Program Files (x86)\Steam\steamapps\common\HeavenBurnsRed"
$soundDir = "HeavenBurnsRed_Data\StreamingAssets\Sound"
$datadir = ""
$dlllist = "libvorbis.dll", "libmpg123-0.dll", "libg719_decode.dll", "avcodec-vgmstream-58.dll", "avformat-vgmstream-58.dll", "avutil-vgmstream-56.dll", "swresample-vgmstream-3.dll", "libatrac9.dll", "libcelt-0061.dll", "libcelt-0110.dll", "libspeex.dll"
function Get-DllDependencyInstalled {
param (
@hjertnes
hjertnes / doom.txt
Created April 6, 2018 08:28
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@vasanthk
vasanthk / System Design.md
Last active December 26, 2024 03:35
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@Inlustra
Inlustra / EXAMPLE_fa.js
Last active December 26, 2024 03:32
Next.js dynamic compatible react-icons generator
import type { IconBaseProps } from "@react-icons/all-files";
import dynamic from "next/dynamic";
import React, { ComponentType } from "react";
export interface IconPackProps extends IconBaseProps {
icon: string;
}
export const IconPack: React.FC<IconPackProps> = ({ icon, ...props }) => {
@ashutoshkrris
ashutoshkrris / YouTube_Playlist_Downloader.md
Last active December 26, 2024 03:32
Download all videos from YouTube Playlist in all supported resolutions (including 1080p and 4K)
  • Using this script, you can download all the videos from a YouTube Playlist in all supported resolutions (including 1080p and 2160p).
  • Enter the playlist url and the resolution you wish to download.
  • Install the required libraries: pytubefix, tqdm, tenacity
  • Make sure you have ffmpeg setup on your machine. Check the tutorial for the setup guide.
  • You can download the videos in the following resolutions: 144p, 240p, 360p, 480p, 720p, 1080p, 1440p, 2160p
  • Check the video for available resolutions.