Skip to content

Instantly share code, notes, and snippets.

@alexellis
alexellis / metering-bash.md
Last active March 3, 2024 21:12
Metering for GitHub Actions

Running vmmeter outside of GitHub Actions

Download arkade, then crane:

curl https://get.arkade.dev | sudo sh
sudo -E arkade oci install ghcr.io/openfaasltd/vmmeter:latest --path /usr/local/bin/

Start the vmmeter in the background:

@noxx3xxon
noxx3xxon / arbitrage.py
Created August 21, 2022 22:34
CFMM Routing Arbitrage Example
import numpy as np
import cvxpy as cp
import itertools
# Problem data
global_indices = list(range(4))
# 0 = TOKEN-0
# 1 = TOKEN-1
# 2 = TOKEN-2
@AbstractUmbra
AbstractUmbra / 00-deprecation.md
Last active July 14, 2024 16:01
discord.py 2.0+ slash command info and examples

This gist has now been 'deprecated' and has moved...

... to my blog style space for easier contribution by third parties and to provide what I believe to be an easier reading experience. Please field all enquiries and issues to the source repository.

#!/bin/bash
# This script will download the contents of a GitHub repo
# and place them in a local directory.
#
# Usage:
# download-repo.sh <repo> <output-path> <nested-path> <branch-name>
#
# Example:
# download-repo.sh wattenberger/kumiko ./kumiko-assets master public/assets

Current status : working, but no fingerprint reader and no Fn key before first suspend.

Initial hardware setup

How I got it working

  1. Open Automator.app
  2. Create new Quick Action
  3. Select Run AppleScript
  4. Add this:
set inputVolume to input volume of (get volume settings)
if inputVolume = 0 then
	set inputVolume to 100
	display notification "Volume set to 100" with title "✅ Microphone is on"
@melamriD365
melamriD365 / fetchsubgridClassicUIAndUCI.js
Created April 29, 2019 15:57
set fetchXml dynamically to a subgrid in classic UI and Unified Client Interface
function FetchViaName(executionContext) {
var formContext = executionContext.getFormContext();
var fullname = null;
var tabObj = formContext.ui.tabs.get("tab_summary");
var secObj = tabObj.sections.get("sec_contactCompaigns");
secObj.setVisible(false)
var isUnified = isUCI()
//--------------------------------------Unified Interface----------------------------------------//
@vanous
vanous / grph.py
Created November 1, 2018 20:42
gadgedbridge simple data exploration
import sqlite3
import matplotlib.pyplot as plt
import datetime
import numpy as np
conn = sqlite3.connect('Gadgetbridge')
c = conn.cursor()
a=c.execute("select strftime('%Y.%m.%d', datetime(timestamp, 'unixepoch')) as d,sum(STEPS) from MI_BAND_ACTIVITY_SAMPLE group by d").fetchall()
b={x[0]:x[1] for x in a}
@HoldOffHunger
HoldOffHunger / bradvin.social.share.urls.txt
Last active May 19, 2024 10:45
Social Share URL's (Summary)
https://www.facebook.com/sharer.php?u={url}
https://www.facebook.com/dialog/share?app_id={app_id}&display={page_type}&href={url}&redirect_uri={redirect_url}
https://reddit.com/submit?url={url}&title={title}
https://twitter.com/intent/tweet?url={url}&text={title}&via={user_id}&hashtags={hash_tags}
https://www.linkedin.com/sharing/share-offsite/?url={url}
https://api.whatsapp.com/send?phone={phone_number}&text={title}%20{url}
https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={text}&tags={hash_tags}
http://pinterest.com/pin/create/button/?url={url}
https://www.blogger.com/blog-this.g?u={url}&n={title}&t={text}
https://www.evernote.com/clip.action?url={url}&title={title}
@Pulimet
Pulimet / AdbCommands
Last active July 25, 2024 13:23
Adb useful commands list
Hi All!
I've recently launched a tool that wraps many of the commands here with a user interface. This desktop application is currently available for macOS. There's a roadmap outlining planned features for the near future.
Feel free to request any features you'd like to see, and I'll prioritize them accordingly.
One of the most important aspects of this application is that every command executed behind the scenes is displayed in a special log section. This allows you to see exactly what’s happening and learn from it.
Here's the link to the repository: https://github.com/Pulimet/ADBugger
App Description:
ADBugger is a desktop tool designed for debugging and QA of Android devices and emulators. It simplifies testing, debugging, and performance analysis by offering device management, automated testing, log analysis, and remote control capabilities. This ensures smooth app performance across various setups.