Skip to content

Instantly share code, notes, and snippets.

View sarxos's full-sized avatar

Bartosz Firyn sarxos

  • Lionbridge
  • Poland
View GitHub Profile
@CemraJC
CemraJC / site-structure-generator.js
Created February 8, 2024 09:05
Wiki.JS Version 2 - Dynamic Page Structure / TOC Generator
<script>
// ^^^
// Keep the <script> tags when copying into Wiki.JS page editor
async function fetchAllPages() {
const graphqlEndpoint = "/graphql";
const query = `
query GetAllPages {
pages{
list(limit: 1000, orderBy: PATH, orderByDirection: ASC) {
@joepie91
joepie91 / .md
Last active October 10, 2025 14:37
Running a Node.js application using nvm as a systemd service

Read this first!

Hi there! Since this post was originally written, nvm has gained some new tools, and some people have suggested alternative (and potentially better) approaches for modern systems. Make sure to have a look at the comments to this article, before following this guide!


The original article

Trickier than it seems.

@TotemaT
TotemaT / sms.sh
Created August 21, 2015 20:00
Send an sms from a computer through an Android device using ADB
#!/bin/zsh
# Send text through adb by Madura A.
# https://market.android.com/details?id=org.jraf.android.nolock
# Please use the above app(or similar) to keep it from locking while
# using this script
# FIX: Android 4.1.1 suggested by samox86
PATH=$PATH:/system/xbin:/system/bin
# Change path if necessary
package us.sosia.media.ui;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
package us.sosia.media.webcam;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;