Skip to content

Instantly share code, notes, and snippets.

@PJUllrich
PJUllrich / update_tool_version.sh
Last active February 22, 2024 06:25
A bash script to update the Elixir and erlang versions in your application.
#!/bin/bash
# Updates either the Elixir or erlang version everywhere in the project
set -e
if [ "$#" -ne 2 ]; then
echo "Usage: $0 old_version new_version. Example: $0 1.15.7 1.16.1"
exit 1
fi
@padeoe
padeoe / README_hfd.md
Last active April 29, 2024 07:37
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, this command-line tool smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.
@AbstractUmbra
AbstractUmbra / 00-deprecation.md
Last active May 2, 2024 02:34
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.

@CarlosLannister
CarlosLannister / kibana-guest-nginx
Last active February 13, 2022 13:41
Nginx configuration for kibana guest access
server {
server_name YOUR_DOMAIN;
listen 443 ssl;
ssl on;
ssl_certificate ROUTE_TO_SSL.cer;
ssl_certificate_key ROUTE_TO_SSL.pem;
location / {
proxy_set_header Host $proxy_host;
// (1) function to get KV variables
const _ENV = () => [replace-with-namespace-name].get('_ENV');
let ENV={};
// (2) listen for a request
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
// (3) function to log to LOGDNA
@svarlamov
svarlamov / typeform-countries-list.txt
Last active April 13, 2024 02:42
Typeform Global Countries List (Dropdown, Multiple Choice, Legal)
United States
United Kingdom
China
Canada
United Arab Emirates
Australia
Andorra
Afghanistan
Antigua and Barbuda
Anguilla
@soderlind
soderlind / Install.txt
Last active March 5, 2024 20:30
macOS DoH! (DNS over HTTPS) using cloudflared
1) Install cloudflared using homebrew:
brew install cloudflare/cloudflare/cloudflared
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content
proxy-dns: true
proxy-dns-upstream:
- https://1.1.1.1/dns-query
- https://1.0.0.1/dns-query
@oliveratgithub
oliveratgithub / emojis.json
Last active April 26, 2024 22:35
Emoji-list with emojis, names, shortcodes, unicode and html entities [massive list]
{
"emojis": [
{"emoji": "👩‍👩‍👧‍👧", "name": "family: woman, woman, girl, girl", "shortname": ":woman_woman_girl_girl:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F467", "html": "👩‍👩‍👧‍👧", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👧‍👦", "name": "family: woman, woman, girl, boy", "shortname": ":woman_woman_girl_boy:", "unicode": "1F469 200D 1F469 200D 1F467 200D 1F466", "html": "👩‍👩‍👧‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👩‍👩‍👦‍👦", "name": "family: woman, woman, boy, boy", "shortname": ":woman_woman_boy_boy:", "unicode": "1F469 200D 1F469 200D 1F466 200D 1F466", "html": "👩‍👩‍👦‍👦", "category": "People & Body (family)", "order": ""},
{"emoji": "👨‍👩‍👧‍👧", "name": "family: man, woman, girl, girl", "shortname": ":man_woman_girl_girl:", "unicode": "1F468 200D 1F469 200D 1F467 200D 1F467", "html": "👨‍👩&z
@willinspire
willinspire / Google Script Cache-Busting IMPORTHTML.md
Last active June 15, 2023 16:16 — forked from ranaroussi/Google docs cache-busting importdata.md
It is not easy to refresh the IMPORTHTML functions in Google Sheets due to cashe limitations. The resulting limitations are old data instead of new data being pulled into the Sheet upon running a Script to reload the IMPORTHTML function. This Google Script is a "Cache-Busting" function which circumvents this problem.
// Set your variables below
SHEET_NAME="MC-Import-Data"
URL="https://coinmarketcap.com/currencies/views/all/"

// Create a trigger to refresh every 5 minutes
function myFunctionA() {
  ScriptApp.newTrigger("getData")
  .timeBased()
 .everyMinutes(5)
@madhur
madhur / clone.py
Created February 12, 2017 15:39
Bulk clone github repositories (including private)
import requests
import json
import subprocess
GITHUB_ORGANIZATION = "madhur"
ACCESS_TOKEN=""
CLONE_DIR="./"
r = requests.get("https://api.github.com/orgs/" + GITHUB_ORGANIZATION + "/repos?per_page=200&access_token=" + ACCESS_TOKEN)