Skip to content

Instantly share code, notes, and snippets.

@andreif
andreif / daemon.md
Last active May 8, 2024 00:17
A simple unix/linux daemon in Python

A simple unix/linux daemon in Python

Source: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

Access: http://web.archive.org/web/20131025230048/http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/

by Sander Marechal

I've written a simple Python class for creating daemons on unix/linux systems. It was pieced together for various other examples, mostly corrections to various Python Cookbook articles and a couple of examples posted to the Python mailing lists. It has support for a pidfile to keep track of the process. I hope it's useful to someone.

@kyo-takano
kyo-takano / making-the-most-of-local-llms.ipynb
Last active May 8, 2024 00:13
ローカルLLMはこーやって使うの💢
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@AndrewMast
AndrewMast / disable_vanguard.vbs
Last active May 8, 2024 00:13
Commands to disable Riot Vanguard when you aren't playing Valorant
' Disables Vanguard from starting when you boot your computer
Call CreateObject("Shell.Application").ShellExecute("cmd.exe", "/c ""sc config vgc start= disabled & sc config vgk start= disabled""", "", "runas")
@braden-w
braden-w / description.md
Last active May 8, 2024 00:09
Google Sheets Script for Fetching Data from Supabase

Google Sheets Script for Fetching Data from Supabase

This Google Sheets script fetches data from a Supabase database and writes the selected headers and data to the active sheet. The script first clears the sheet, writes the headers, then fetches the data from the Supabase API, and finally writes the data to the sheet. It is optimized and has anonymized variables for public use.

How to Use

  1. Create a new Google Sheet or open an existing one.
  2. Click on "Extensions" in the menu, then select "Apps Script." (If you don't see "Extensions," click on "Tools" and then "Script editor.")
  3. In the Apps Script editor, replace the default Code.gs content with the content of supabase_to_google_sheets.gs.
  4. Replace the SUPABASE_URL and SUPABASE_ANON_KEY variables with your actual Supabase URL and anon key.
@esskayesss
esskayesss / hathitrust-downloader.sh
Created May 8, 2024 00:06
downloads full view books from hathitrust.org
#!/bin/bash
# utility functions
function rand_str() {
local length=${1:-8}
LC_ALL=C tr -dc A-Za-z0-9 </dev/urandom | head -c $length
}
function debug() {
@aroslov
aroslov / handleCorsForCloudFront.js
Created May 21, 2019 07:04
Handle CORS (OPTIONS request) in Edge Lambda for AWS CloudFront
function checkOrigin(origin) {
if (!origin) {
return false;
}
const [protocol, host, port] = origin.split(':');
// TODO: put your own logic here
if (!host) {
return false;
}
if (host === '//localhost') {
@chranderson
chranderson / nvmCommands.js
Last active May 8, 2024 00:04
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@0xdevalias
0xdevalias / bypassing-cloudflare-akamai-etc.md
Last active May 8, 2024 00:04
Some notes/resources for bypassing anti-bot/scraping features on Cloudflare, Akamai, etc.