Skip to content

Instantly share code, notes, and snippets.

@thomasjsn
thomasjsn / laravel-queue.service
Last active April 24, 2024 23:54
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
@jordanlambrecht
jordanlambrecht / autoDeleteGmail.js
Last active April 24, 2024 23:52
Auto Delete / Archive Emails in Gmail
function autoDelete() {
console.log('Started autoDelete run.');
var delayDays = 2;
var maxDate = new Date();
maxDate.setDate(maxDate.getDate()-delayDays);
var label = GmailApp.getUserLabelByName("delete me");
var threads = label.getThreads();
if(threads.length > 0){
console.log('Found ' + threads.length + ' emails marked for deletion.');
@Ichunjo
Ichunjo / fine_dehalo.py
Last active April 24, 2024 23:48
fine_dehalo rewrite
from __future__ import annotations
from math import ceil, floor
from typing import Optional, Sequence
import vapoursynth as vs
from lvsfunc.kernels import BSpline, Lanczos, Mitchell
# https://github.com/Varde-s-Forks/RgToolsVS
from rgvs import minblur, repair
from vsmask.better_vsutil import join, split
import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.TextComponent;
import net.kyori.adventure.text.format.NamedTextColor;
import net.kyori.adventure.text.format.Style;
import net.kyori.adventure.text.format.TextDecoration;
import net.minestom.server.utils.StringUtils;
import java.util.*;
public class ComponentWrapper {
@trongthanh
trongthanh / gist:2779392
Last active April 24, 2024 23:46
How to move a folder from one repo to another and keep its commit history
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html
# First of all you need to have a clean clone of the source repository so we didn't screw the things up.
git clone git://server.com/my-repo1.git
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command
git filter-branch --subdirectory-filter your_dir -- -- all
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command.
@IgorHalfeld
IgorHalfeld / addSibs.js
Last active April 24, 2024 23:44
add sibelius to any website
function addSibs () {
const div = document.createElement('div')
const img = document.createElement('img')
div.style.position = 'fixed'
div.style.zIndex = '99999999'
div.style.right = '100px'
div.style.bottom = '0px'
div.appendChild(img)
@thoroc
thoroc / readme.md
Last active April 24, 2024 23:43
How to boot Ubuntu 16.04 on the Shield TV with X1 GPU drivers

So because Android can be kind of annoying sometimes for dev work, especially if you're just interested in working on the aarch64 JIT or GLES code, booting a Linux distro can be pretty useful. This guide can also be extended to outright installing Ubuntu on the Shield TV by flashing the boot partition but we won't cover that. Also note, everything about this guide is non-destructive, so unless you decide to flash anything, you can't break your Shield TV.

I'm writing this guide assuming you have a functional UNIX environment of some sort and a non-pro Nvidia Shield TV 2015. The pro variant WILL NOT WORK with this specific guide, but the boot files are given for them as well in the XDA links below.

You'll need a USB device or MicroSD at least 4 GB large. 8 GB or higher is highly recommended.

Quick and easy way to get up and running

Go download all the files here: https://drive.google.com/drive/folders/0B39Ag2JMI49DcDJUTnBlRUJPRzA

package net.hollowcube.mapmaker.backpack;
import net.kyori.adventure.key.Key;
import net.minestom.server.item.ItemComponent;
import net.minestom.server.item.ItemStack;
import net.minestom.server.item.Material;
import net.minestom.server.utils.validate.Check;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
@xiaolai
xiaolai / notion.md
Last active April 24, 2024 23:40
Change fonts of Notion APP

Change font settings for Notion (Web/Desktop App)

Notion provides only three fonts to choose... I have to inject css styles to meet my ends, using Stylus extension for Edge and Nativefier for Desktop App.

notion.css

.notion-page-content {
    font-family: 'Kaiti SC'
} 
@dinhchi27
dinhchi27 / Key Sublime Text 3.2.1 Build 3207 - Sublime Text 3 License Key
Last active April 24, 2024 23:37
Key Sublime Text 3.2.1 Build 3207 - Sublime Text 3 License Key
Key Sublime Text 3.2.1 Build 3207
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD