Skip to content

Instantly share code, notes, and snippets.

@ali-kamalizade
ali-kamalizade / healthcheck.js
Last active April 26, 2024 12:47
A sample implementation of a health check endpoint for Node.js using Express
// app.js: register the route. In our case, we don't want authorization for this route
app.use('/healthcheck', require('./routes/healthcheck.routes'));
// healthcheck.routes.js: return a 2xx response when your server is healthy, else send a 5xx response
import express from 'express';
const router = express.Router({});
router.get('/', async (_req, res, _next) => {
// optional: add further things to check (e.g. connecting to dababase)
@ochococo
ochococo / NI_GPIB-USB-HS_PyVISA_UBUNTU.md
Last active April 26, 2024 12:46
National Instruments GPIB-USB-HS via PyVISA on UBUNTU.md

National Instruments GPIB-USB-HS + PYVISA on Ubuntu

LINUX-GPIB

Install depedencies:

sudo apt-get install tk-dev build-essential texinfo texi2html libcwidget-dev libncurses5-dev libx11-dev binutils-dev bison flex libusb-1.0-0 libusb-dev libmpfr-dev libexpat1-dev tofrodos subversion autoconf automake libtool mercurial
@FlaShG
FlaShG / CanvasPositioningExtensions.cs
Last active April 26, 2024 12:46
A small Unity helper class to convert viewport, screen or world positions to canvas space.
using UnityEngine;
/// <summary>
/// Small helper class to convert viewport, screen or world positions to canvas space.
/// Only works with screen space canvases.
/// </summary>
/// <example>
/// <code>
/// objectOnCanvasRectTransform.anchoredPosition = specificCanvas.WorldToCanvasPoint(worldspaceTransform.position);
/// </code>
@bsweger
bsweger / useful_pandas_snippets.md
Last active April 19, 2024 18:04
Useful Pandas Snippets

Useful Pandas Snippets

A personal diary of DataFrame munging over the years.

Data Types and Conversion

Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)

@alejandro-martin
alejandro-martin / multiple-ssh-keys-git.adoc
Last active April 26, 2024 12:46
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

@willurd
willurd / web-servers.md
Last active April 26, 2024 12:46
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@fosterseth
fosterseth / awx_how_a_job_runs.md
Last active April 26, 2024 12:45
How a job runs
@vuong2023
vuong2023 / 15on16sepactivationguide.md
Created April 26, 2024 12:44 — forked from pixdoet/15on16sepactivationguide.md
How to activate a device on iOS 15 that was futurerestored on 16 sep

HOLY SHIT is this original guide outdated and broken as fuck

Credits to OrangeRa1n for the original guide

YOLOOOOOOOOO?

This is a guide on how to activate ur idevice on ios 15 (maybe ios 14 idk) when its futurerestored on 16 sep.

DISCLAIMER: I am very aware people might use this to bypass icloud, but I am NOT encouraging you to bypass icloud.

ALSO: THIS IS RECOMMENDED FOR ADVANCED USERS ONLY, i am not responsable for ur device being broken (tho idk how it becomes broken via this)

@fbarretto
fbarretto / streamdiffusion-mac.md
Last active April 26, 2024 12:40
StreamDiffusion on a Mac

This is a gist on how to get StreamDiffusion running on a Mac (mps)

  1. Clone the repo

git clone https://github.com/cumulo-autumn/StreamDiffusion.git
  1. Setup the environment

cd StreamDiffusion
@jdthorpe
jdthorpe / FetchXML.md
Last active April 26, 2024 12:39
Notes on FetchXML

Learn to Love Tolerate FetchXML

Overview

FetchXML seems to be a quirky subset of the SQL implemented in XML and optimized for UI tasks, including:

  • the ability select specific fields (foo, b.bar) or all fields (*) from an entity
  • perform LEFT OUTER and INNER joins
  • assign aliases to attributes (select a.b as foo) and (joined) entities (left join foo as BAR)