Skip to content

Instantly share code, notes, and snippets.

@masselmello
masselmello / rsg_group_mcfit_high5_johnreed_capacity_widget.js
Last active March 26, 2024 11:41
iOS widget powered by the Scriptable app that shows the current capacity of your McFit gym (RSG group)
/**
* Script for scriptable to get the current capacity of McFit Gyms
*/
let gymId = 1731068920
let param = args.widgetParameter
if (param != null && param.length > 0) {
gymId = param
}
const currentGymCapacity = await fetchGymCapacity(gymId)
@mbreksopuro
mbreksopuro / start_reindex.sh
Last active September 26, 2023 18:28
Reindex API from Remote ElasticSearch to Local ElasticSearch Servers (for up to ES 6.x)
#!/bin/bash
###################################################
## Start ElasticSearch Reindex Same Indices
##
## Created by : Hartfordfive - 2019-02-01
## Modified by : Marjono B. Reksopuro - 2019-03-11
##
##
###################################################
@jackm
jackm / can-packages-and-tools.md
Last active June 27, 2024 15:25
Collection of CAN bus packages and tools

Collection of CAN bus packages and tools

This document assumes the use of Linux as the chosen development platform. Items in bold are highly recommended.

It is recommended to use SocketCAN when working with CAN bus on Linux. It is supported by the Linux kernel mainline and follows the Linux interface model, allowing you to use other network tools such as Wireshark. This also allows the creation of virtual CAN interfaces where no physical hardware is required to simulate or replay CAN messages.

@tmkdev
tmkdev / SWCAN_test_m2.ino
Created October 7, 2017 18:26
SWCAN on the macchina M2.
#include <SPI.h>
#include <MCP2515_sw_can.h>
// Pin definitions specific to how the MCP2515 is wired up.
#define CS_PIN SPI0_CS3
#define INT_PIN SWC_INT
#define Serial SerialUSB
// Create CAN object with pins as defined
SWcan CAN(CS_PIN, INT_PIN);
@tralston
tralston / reload-config-postgresql.md
Created August 21, 2017 08:18
[Reload PostgreSQL config] After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. #postgres

After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. The easiest way to do this is by restarting the postgres service:

service postgresql restart

When the service command is not available (no upstart on Synology NAS, for example), there are some more creative ways to reload the config. Note this first one needs to be done under the user that runs postgres (usually the user=postgres).

user#  sudo su postgres
postgres#  pg_ctl reload
@codexss
codexss / smstools3.md
Last active October 15, 2023 17:47
Openwrt/LEDE smstools3 forward sms to telegram
opkg update
opkg install kmod-usb-serial kmod-usb-serial-wwan kmod-usb-serial-option usb-modeswitch smstools3 curl iconv

vi /usr/local/bin/pushsms

#!/bin/sh
@gkoyuncu
gkoyuncu / main.c.in.diff
Last active July 15, 2017 06:00
squidguard 1.5b + squid 3.5.6 workaround
--- src/main.c.in
+++ src/main.c.in
@@ -185,7 +185,7 @@
sgReloadConfig();
}
if(failsafe_mode) {
- puts("");
+ puts("ERR");
fflush(stdout);
if(sig_hup){
#AH - AdilHindistan - 2014-02-04 WSUS Update Scopes
## We are trying to find out updates that are needed on Computers but we have NOT approved yet
## WSUS Update Scope
$UpdateScope = New-Object Microsoft.UpdateServices.Administration.UpdateScope
D:\> $updateScope |Get-Member -MemberType property
TypeName: Microsoft.UpdateServices.Administration.UpdateScope