Skip to content

Instantly share code, notes, and snippets.

@odevodyssey
odevodyssey / conmon.sh
Created February 27, 2024 12:55
Scripts to monitor cellular connection for 4G LTE RPi on OpenWrt
#!/bin/sh
# Internet Monitoring Script for QMI Modem
# Modem: Quectel EG25-G
# Script inspired from conmon.sh in ROOter project.
# https://www.ofmodemsandmen.com/
# What is most likely to happen in my experience is modem gets a new IP from ISP, randomly, and interface does not update, therefore outbound traffic stops
# This script will cover both scenarios
@armornick
armornick / RequestFile.cpp
Created March 3, 2016 12:05
How to request a file via the Windows API using both the old and new method
#include <windows.h>
#ifdef UNICODE
/*
IT FUCKING WORKS WITH G++ FUCKING GODDAMIT!!!88!!!
g++ -municode -s -static -Os -o openfiledialog-gnu openfiledialog.cpp -lshell32 -luuid -lole32 -DUNICODE -D_UNICODE -D_WIN32_WINNT=_WIN32_WINNT_VISTA -DNTDDI_VERSION=NTDDI_VISTA
NOTE: forgive the expletives but it took several days to get this working and it turned out I forgot to define the version macros
@moschlar
moschlar / git-daemon
Created August 4, 2015 06:19
systemd-unit for git-daemon
# conf.d file for git-daemon
#
# Please check man 1 git-daemon for more information about the options
# git-daemon accepts. You MUST edit this to include your repositories you wish
# to serve.
#
# Some of the meaningful options are:
# --syslog --- Enables syslog logging
# --verbose --- Enables verbose logging
# --export-all --- Exports all repositories
@kpe
kpe / MathJax based LaTeX plugin for TiddlyWiki 5.md
Last active March 29, 2021 21:36
MathJax based LaTeX plugin for TiddlyWiki 5

LaTeX plugin for TiddlyWiki 5 (based on MathJax)

(based on http://mathjax-tw5.kantorsite.net/)

To use with NodeJS create a plugins/mathjax/ directory in your wiki containing the two files (plugin.info and init.js), i.e.

plugins/
   mathjax/
      plugin.info
      init.js
tiddlers/
#!/bin/bash
if ! [ $# -eq 1 ]; then
echo "Usage: $0 <node-name>"
exit 1
fi
# Make sure you have all dependencies:
# yum -y install libguestfs-tools virt-install
@tdeckers-cisco
tdeckers-cisco / jetty-ondemand.sh
Created November 30, 2012 09:56
Jetty On-demand - bash bootstrap
#!/usr/bin/env bash
#
# Invoke this bootstrap copying following command to the command line:
#
# bash < <(curl -s -L https://raw.github.com/gist/4174871/jetty-ondemand.sh)
#
# (this should be run as root)
#
# move to working dir.