Skip to content

Instantly share code, notes, and snippets.

View stuaxo's full-sized avatar
💭
 

Stuart Axon stuaxo

💭
 
View GitHub Profile
@schappim
schappim / just_f-ing_ping.md
Last active February 17, 2024 06:15
Just F-ing Ping - Because sometimes you just want to f-ing ping!

Just F-ing Ping

Because sometimes you just want to f-ing ping!

Modern browsers, believing they are being clever, hide the protocol in the URL bar.

image

However, even if you only select the hostname, when you paste that URL into your terminal, you will encounter the following:

image

@pthom
pthom / verbose_function_decorator.py
Last active December 15, 2022 14:19
Python decorator to log function call details (can include: input parameters, output parameters, return value)
import logging
import inspect
def verbose_function(dump_args: bool = True, dump_return: bool = False, dump_args_at_exit: bool = False):
"""
Decorator to print function call details.
This can include:
* input parameters names and effective values
* output parameters (if they were modified by the function)
/**
* This sketch connects an AirGradient DIY sensor to a WiFi network, and sends
* these metrics via MQTT. Adapted from original by Jeff Geerling.
*/
#include <AirGradient.h>
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <PubSubClient.h>
@jasondavis
jasondavis / batch.md
Created October 30, 2021 13:17 — forked from Skhmt/batch.md
Reference for writing .bat/.cmd files in windows
@wlib
wlib / LICENSE
Last active April 30, 2024 17:07
Run a shell script with bash, line-by-line, prompted on each command. Useful for running unknown scripts or debugging. Not a secure substitute for understanding a script beforehand.
MIT License
Copyright (c) 2021 Daniel Ethridge
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@bpsib
bpsib / BBC-Radio-HLS.m3u
Last active May 1, 2024 11:32 — forked from stengland/BBC-Radio.m3u
BBC Radio Streams
#EXTM3U
#EXTINF:-1,BBC - Radio 1
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one/bbc_radio_one.isml/bbc_radio_one-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Xtra
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_1xtra/bbc_1xtra.isml/bbc_1xtra-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Dance
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_dance/bbc_radio_one_dance.isml/bbc_radio_one_dance-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 1Relax
http://as-hls-ww-live.akamaized.net/pool_904/live/ww/bbc_radio_one_relax/bbc_radio_one_relax.isml/bbc_radio_one_relax-audio%3d96000.norewind.m3u8
#EXTINF:-1,BBC - Radio 2
@folkengine
folkengine / install.sh
Created February 6, 2021 15:29 — forked from dannymota/install.sh
Install Chrome, Pip, Venv, ChromeDriver and Selenium on Ubuntu 20.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`
@FreddieOliveira
FreddieOliveira / docker.md
Last active May 9, 2024 02:42
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

Install [Meson and ninja](https://mesonbuild.com/Getting-meson.html).
Build cairo
Disable some options to avoid compile/link errors
```
git clone --depth 1 https://gitlab.freedesktop.org/cairo/cairo.git
meson --prefix=c:\path\to\install --buildtype release -D tests=disabled -D gl-backend=disabled cairo_builddir cairo
meson compile -C cairo_builddir
meson install -C cairo_builddir
```
@sangwoo-joh
sangwoo-joh / libcst_transformer.py
Last active June 14, 2022 03:56
A rough example code for renaming variables using libcst.
import libcst
import difflib
from termcolor import colored
class RenameTransformer(libcst.CSTTransformer):
def __init__(self, rename_pairs):
self.rename_pairs = rename_pairs
self.restore_keywords = []