This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
import esbuild from "esbuild"; | |
import fs from "fs/promises"; | |
import { resolve as resolvePath } from "path"; | |
const [root] = process.argv.slice(2); | |
console.log(JSON.stringify(await getGnomeExtensionGiDependencies(root))); | |
async function getGnomeExtensionGiDependencies(root) { | |
const entryPoints = [resolvePath(root, "extension.js")]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
home.file."test-file" = { | |
text = "Hello world"; | |
force = true; | |
mutable = true; | |
}; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const ExtensionUtils = imports.misc.extensionUtils; | |
const FileUtils = imports.misc.fileUtils; | |
const { ExtensionType } = ExtensionUtils; | |
(async function () { | |
let perUserDir = Gio.File.new_for_path(global.userdatadir); | |
const extensionFiles = [...FileUtils.collectFromDatadirs('extensions', true)]; | |
const extensionObjects = extensionFiles.map(({dir, info}) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib | |
, fetchFromGitHub | |
, rustPlatform | |
, pkg-config | |
, dbus | |
, xorg | |
, pango | |
, cairo | |
, libusb | |
, libvpx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
function calc(from = 0, to = Infinity) { | |
const ctx = document.querySelector("canvas").getContext("2d"); | |
ctx.font = "DejaVu Sans"; | |
results = []; | |
let i = from; | |
while (i < to) { | |
let char; | |
if (i % 0xff == 0) { | |
console.log("0x" + i.toString(16)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OUT_FILE="$(xdg-user-dir DOCUMENTS)/Домашка на $(date --iso-8601).pdf" | |
CAMERA_PATH="/run/user/1000/gvfs/sftp:host=192.168.0.2,port=1739/primary/DCIM/Camera" | |
convert -monitor -auto-orient -quality 35 -strip `ls -1tr $CAMERA_PATH/* | tail -${1:-1}` "$OUT_FILE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for x in \ | |
nvidia-460.67-5-x86_64.pkg.tar.zst \ | |
nvidia-dkms-460.67-1-x86_64.pkg.tar.zst \ | |
nvidia-settings-460.67-1-x86_64.pkg.tar.zst \ | |
nvidia-utils-460.67-1-x86_64.pkg.tar.zst \ | |
; do | |
test -f $x || \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
audd() { | |
api_token=test # get one from https://audd.io or use "test" if you don't mind the rate limits | |
source="$(pactl info | grep 'Default Sink' | cut -d":" -f2 | cut -c2-).monitor" | |
echo "Listening..." | |
ffmpeg -hide_banner -loglevel error -f pulse -i $source -t 7 -y /tmp/audd.ogg || return 1 | |
echo "Uploading..." | |
curl -s -F api_token=$api_token -F file=@/tmp/audd.ogg https://api.audd.io | jq | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let fullscreenElement; | |
Object.defineProperty(document, "fullscreenElement", { | |
get() { | |
return fullscreenElement; | |
}, | |
set(value) { | |
fullscreenElement = value; | |
}, | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__npm_safeguard() { | |
python3 ~/npm_safeguard.py $1 && command "$@" | |
} | |
npm() { | |
__npm_safeguard npm "$@" | |
} | |
pnpm() { | |
__npm_safeguard pnpm "$@" | |
} | |
yarn() { |
NewerOlder