Skip to content

Instantly share code, notes, and snippets.

View duncte123's full-sized avatar
:fishsticks:
yummy fishticks

Duncan Sterken duncte123

:fishsticks:
yummy fishticks
View GitHub Profile
@duncte123
duncte123 / discord canary.fish
Created October 7, 2024 06:29
Download and run discord
#!/usr/bin/fish
wget "https://discord.com/api/download/canary?platform=linux&format=tar.gz" -O discord_canary.tar.gz
tar -xf ./discord_canary.tar.gz
rm discord_canary.tar.gz
./DiscordCanary/DiscordCanary
@duncte123
duncte123 / Oengus Markdown.md
Created September 23, 2024 09:54
Oengus markdown cheat sheet

Oengus allows for markdown in a few places. This document serves as a guide and a cheat sheet in case you ever need help. Markdown on oengus is split into two sections, simple and advanced. Simple markdown is used for schedule runs, this only allows a few things. Advanced markdown allows pretty much everything!

Simple markdown (schedules)

Schedule lines, reffered to as "runs" in the UI, only allow very basic markdown in the runner, game and category fields. This markdown is as follows:

  • **bold text** => bold text
  • _italicised text_ => italicised text
@duncte123
duncte123 / translated-content.directive.ts
Created April 28, 2024 16:58
translated content for angular 13
import {
AfterContentInit,
ChangeDetectorRef,
ContentChildren,
Directive,
Input,
OnDestroy,
OnInit,
QueryList,
Renderer2,
@duncte123
duncte123 / Main.java
Created March 9, 2024 17:07
Storing a string in an integer
package me.duncte123.fuck;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import sun.misc.Unsafe;
public class Main {
private static Integer integer;
@duncte123
duncte123 / TwitchIngest.swift
Created December 13, 2022 06:56 — forked from AFathi/TwitchIngest.swift
A simple Swift enum that contains Twitch RTMP addresses in different cities
//
// TwitchIngest.swift
//
//
// Created by Ahmed Bekhit on 5/12/18.
// Copyright © 2018 Ahmed Bekhit. All rights reserved.
//
// MARK:- Source: https://stream.twitch.tv/ingests/
@duncte123
duncte123 / index.js
Created January 5, 2022 21:09
Fetch oengus schedule to file
// https://www.npmjs.com/package/ky
const ky = require('ky');
const fs = require('fs');
const MARATHON_ID = '';
// can be found in devtools (f12) -> application -> localstorage -> oengus.io -> token
const TOKEN = '';
async function downloadSchedule() {
const json = await ky.get(`https://oengus.io/api/marathons/${MARATHON_ID}/schedule`, {
@duncte123
duncte123 / m3u8-to-mp4.md
Last active June 16, 2021 10:25 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@duncte123
duncte123 / generated-second-try.txt
Last active December 7, 2024 10:22
Our first AI autput
Strain and loaf
Shot acrost better than catches the most amount of tread
Knock once the salt
No man is what you get
The pot calling thee croses
Gutsied of nead
Abses make love not work is like a drink with a brame
Life is like a box of chocolates, sometimes hard to find, have an elephant at this mouths have big ears
Kick your own cannot stand
Prime to pleasure
@duncte123
duncte123 / TwemojiParser.java
Created November 9, 2019 19:14 — forked from danfickle/TwemojiParser.java
Twemoji parser for Java 8 using trie (replaces emoji with img tags).
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@duncte123
duncte123 / laravel-queue.service
Created April 9, 2019 08:30 — forked from thomasjsn/laravel-queue.service
Laravel queue worker using systemd.
# Laravel queue worker using systemd
# ----------------------------------
#
# /lib/systemd/system/queue.service
#
# run this command to enable service:
# systemctl enable queue.service
[Unit]
Description=Laravel queue worker