Skip to content

Instantly share code, notes, and snippets.

View khanhas's full-sized avatar
🤖
Extremely busy with uni stuff right now. Sorry!

khanhas

🤖
Extremely busy with uni stuff right now. Sorry!
View GitHub Profile
@khanhas
khanhas / syncLib.js
Last active December 22, 2020 09:04
// @ts-check
// NAME: Sync Library
// AUTHOR: khanhas
// DESCRIPTION: Sync your Liked tracks to a playlist
/// <reference path="../globals.d.ts" />
(function SyncLib(){
if (!Spicetify.CosmosAPI || !Spicetify.BridgeAPI) {
@khanhas
khanhas / spong-qjs.mjs
Created July 12, 2019 20:04
Sponge: soak up all stdin then put them in a file or stdout.
/**
* Sponge: soak up all stdin then put them in a file or stdout.
*
* Copyright (c) 2019-2019 khanhas (https://github.com/khanhas)
*
* This program is free software: you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@khanhas
khanhas / flag-qjs.mjs
Last active April 3, 2026 11:13
[QuickJS] Command-line arguments parser module
/**
* Command-line argument parser for QuickJS
*
* Copyright (c) 2019-2019 khanhas (https://github.com/khanhas)
*
* This program is free software: you can redistribute it and / or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
@khanhas
khanhas / Yow.css
Created March 28, 2019 00:34
Ueli - Yow
:root {
--background-color: 245,245,245;
--input-container-background: rgba(var(--background-color), 1);
--output-container-background: rgba(var(--background-color),1);
--text-color: #161616;
--active-item-background: #FBD225;
--active-item-text-color: #161616;
--mono-text-color: rgb(242,242,242);
--scrollbar-color: rgb(68,68,68);
--alternative-prefix-background: rgba(var(--background-color), 0.8);
@khanhas
khanhas / user.custom.css
Last active September 26, 2018 10:43
Yellog theme for UELI
:root {
--background-color: 18,18,18;
--input-container-background: rgba(var(--background-color), 0.7);
--output-container-background: rgba(var(--background-color), 0.7);
--text-color: rgb(255,255,255);
--active-item-background: #ffbb00;
--active-item-text-color: #040403;
--mono-text-color: rgb(242,242,242);
--scrollbar-color: rgb(68,68,68);
--alternative-prefix-background: rgba(var(--background-color), 0.8);
@khanhas
khanhas / registerYarnAutocomplete.ps1
Created September 6, 2018 13:35
Register autocomplete script name for Yarn
Register-ArgumentCompleter -Native -CommandName yarn -ScriptBlock {
param($commandName, $wordToComplete, $cursorPosition)
$commandList = (Get-Content "$pwd\package.json" | ConvertFrom-Json).scripts | Get-Member | Select-Object -ExpandProperty Name
if ($wordToComplete -match "\s(\w*)") {
$term = $matches[1]
$commandList | Where-Object { $_ -match "^$term"} | ForEach-Object {
[System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
}
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// START METADATA
// NAME: WebNowPlaying for UELI
// AUTHOR: tjrulz (modded by khanhas)
// DESCRIPTION: Get song information and control player
// END METADATA
/// <reference path="../globals.d.ts" />
(function WebNowPlaying() {
const INFO_LIST = [