Skip to content

Instantly share code, notes, and snippets.

@michpohl
michpohl / svg-to-xml.markdown
Last active September 18, 2024 19:51
How to easily batch convert many .svg files to Android Vector Drawables

How to easily batch convert many .svg files to Android Vector Drawables

Note that Android Studio claims to also be able to batch-import files starting version 3.4. Depending on how well that works and what you like, this solution might still be preferrable (it is for me)

We will need two tools:

  1. Prior to conversion we want to optimize our .svg files using SVGO. SVG Optimizer is a Node.js-based tool for optimizing SVG vector graphics files. Find it here: https://www.npmjs.com/package/svgo

  2. For conversion we will use vd-tool, a command line tool built from the actual converter inside Android Studio, so we know it will just do the same conversions. Here is a link: https://www.androiddesignpatterns.com/2018/11/android-studio-svg-to-vector-cli.html

@seatedro
seatedro / build.zig
Created September 18, 2024 18:47
static ffmpeg zig build
const std = @import("std");
const builtin = @import("builtin");
pub fn build(b: *std.Build) !void {
const av = b.option(bool, "av", "Compile ffmpeg") orelse false;
const optimize = b.standardOptimizeOption(.{ .preferred_optimize_mode = .ReleaseFast });
const dep_stb = b.dependency("stb", .{});
const dep_ffmpeg = b.dependency("ffmpeg", .{});
// Add a new step for compiling Ffmpeg
@Setnour6
Setnour6 / PPH&S-SGL-QuestsAndRewards.md
Last active September 18, 2024 19:49
For a Garry's Mod server created by Gentoi and Dylansonfire
@Setnour6
Setnour6 / PPH&S-Suggestion-MoreCrates.md
Last active September 18, 2024 19:49
For Pill Pack Hide and Seek, A Garry's Mod Server, Created by Gentoi and Dylansonfire

Referencing https://discord.com/channels/1241820558287700179/1258121612863995986, where my idea is https://discord.com/channels/1241820558287700179/1258121612863995986/1258127810351075339.

Regular Content

  • Crate #2: Red in color. Gives players the same kind of content as Crate #1 but with more red and/or other rotations. Some content in Crate #1 can also be found in this crate. This can cost 10000 points.
  • Collector’s Crate: Contains Plushies and other accessories. May include weapons as well. This can cost 50000 points.
  • Crate of Myths: Contains content from past ranking seasons (I.e. Season 1, Season 2, etc.). This crate can cost 100000 points. This crate cannot drop as an end-of-round reward.

Seasonal Content

  • Christmas Gifts: Gives players Classic Points (and Premium Points), Christmas and winter themed skins/playermodels and items.
@Setnour6
Setnour6 / PPH&S-Rules.md
Last active September 18, 2024 19:49
For Pill Pack Hide and Seek, A Garry's Mod Server, Created by Gentoi and Dylansonfire

Pill Pack Hide and Seek - Punishment General Guidelines

This is meant to be a general guide for staff members and is not required to be followed to a T. These guidelines also apply to the GMod PPHNS Server, like with rules. Punishment length varies by rulebreaking severity.

Ghosting (Includes Ghost-Snitching and Specific Snitching)

  • Warning
  • Timeout/Mute/Gag, 10 minutes (2 hours on repeated offences)
  • Blind/Slay (on repeated offences)
@arturo182
arturo182 / bom2grouped_csv_jlcpcb.xsl
Last active September 18, 2024 19:49
A KiCad BOM script for generating JLCPCB PCBA-compatible files!
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format
Copyright (C) 2014, Wolf Walter.
Copyright (C) 2013, Stefan Helmert.
Copyright (C) 2018, Kicad developers.
Copyright (C) 2019, arturo182.
GPL v2.
Functionality:
Generation of JLCPCB PCBA compatible BOM
@jamiephan
jamiephan / README.md
Last active September 18, 2024 19:47
A script to automatically add ALL items to your account in quixel

Script to add all items from quixel

As quixel is being removed, all items are free to aquire. This script is to automate the process to add items to your account (As of writing, a total of 18874 items)

Note: This script only tested in the latest version of Chrome.

How to use

  1. Copy the script from below (run.js)
  2. Login into https://quixel.com
@YoSoyPhil
YoSoyPhil / README.md
Last active September 18, 2024 19:46
Install Canon EOS Utility 2 full version

How to install Canon EOS Utility 2 full version

EOS Utility 2.14.20a full version install

Go to Canon and select your camera model under software downloads. At the time this guide was written, the link was https://www.canon-europe.com/support/consumer_products/software/eos-utility.html

Select your camera and download "EOS Utility 2.14.20a Updater for Windows" (yes, we will do full install with this file).

Before we can run the installer we need to add a key to our registry.

@christianselig
christianselig / widgets.swift
Created September 18, 2024 19:23
Proper way to handle backwards compatibility of iOS widgets
import WidgetKit
import SwiftUI
@main
struct WidgetExtMain {
static func main() {
if #available(iOS 18.0, *) {
MyWidgets_18.main()
} else {