Skip to content

Instantly share code, notes, and snippets.

@ngtvspc
ngtvspc / EXIF_remover.py
Created January 9, 2018 23:00
Remove EXIF metadata from images
# Uses the Python Imaging Library
# `pip install Pillow` works too
from PIL import Image
image_filename = "picture_with_EXIF.jpg"
image_file = open('image_filename)
image = Image.open(image_file)
# next 3 lines strip exif
image_data = list(image.getdata())
@hubgit
hubgit / journal-feeds.csv
Created April 24, 2013 15:50
All the journal feeds in JournalTOCs
We can't make this file beautiful and searchable because it's too large.
publisher id,feed id,feed url,journal url,journal title
1050,28092,http://journals.uran.ua/eejet/gateway/plugin/WebFeedGatewayPlugin/rss,http://journals.uran.ua/eejet/,"Східно-Європейський журнал передових технологій : Eastern-European Journal of Enterprise Technologies"
1761,25094,http://feeds.feedburner.com/Archeomatica?format=xml,http://www.archeomatica.it/,Archeomatica
1739,24698,http://cerealchemistry.aaccnet.org/action/showFeed?ui=0&mi=3b39wk&ai=rs&jc=cchem&type=etoc&feed=rss,http://cerealchemistry.aaccnet.org/journal/cchem,"Cereal Chemistry"
1721,27750,http://journals.aau.dk/index.php/MIPO/gateway/plugin/WebFeedGatewayPlugin/rss,http://journals.aau.dk/index.php/MIPO,"Musikterapi i Psykiatrien Online"
1549,26667,http://ojs.statsbiblioteket.dk/index.php/bras/gateway/plugin/WebFeedGatewayPlugin/rss,http://ojs.statsbiblioteket.dk/index.php/bras,"Brasiliana - Journal for Brazilian Studies"
@ConnorBaker
ConnorBaker / temp.sh
Last active November 4, 2025 04:48
Build hydraJobs attribute
nix-eval-jobs --flake .#hydraJobs.sm_89.x86_64-linux --store local --constituents | \
jq -cr '.constituents + [.drvPath] | .[] | select(.!=null) + "^*"' | \
nom build --keep-going --no-link --print-out-paths --stdin
  • repo -> repository

  • clone -> bring a repo down from the internet (remote repository like Github) to your local machine

  • add -> track your files and changes with Git

  • commit -> save your changes into Git

  • push -> push your changes to your remote repo on Github (or another website)

  • pull -> pull changes down from the remote repo to your local machine

  • status -> check to see which files are being tracked or need to be commited

  • init -> use this command inside of your project to turn it into a Git repository and start using Git with that codebase

🚀 Complete Guide to Your Biome Configuration

📚 What is Linting? (For Beginners)

Linting is like having a smart assistant that reads your code and helps you:

  • Find bugs before they cause problems
  • Follow best practices and coding standards
  • Keep code consistent across your project
  • Learn better coding patterns automatically
@DavidCatalano
DavidCatalano / perfectViewportFrameRotate.lua
Created September 11, 2022 21:59
Roblox perfectly sized Viewport Frame with model rotation
-- Perfect ViewportFrame Script with 360 degree Rotate
-- thanks to @sleitnick https://www.youtube.com/watch?v=2J-2v_UqNDw for the hard part
-- Put this code in a LocalScript inside of a ScreenGui in StarterGui
-- Change the reference to the model a few lines down to point to your model
-- Delete rows 40 and below if you don't want the rotate code
local makeModelSpin = true -- change this to false to keep the model stationary
local viewportFrame = Instance.new("ViewportFrame")
local camera = Instance.new("Camera" , viewportFrame)
@prologic
prologic / LearnGoIn5mins.md
Last active November 4, 2025 04:32
Learn Go in ~5mins
@krisek
krisek / alert.rules.yml
Last active November 4, 2025 04:29
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
@UuuNyaa
UuuNyaa / batch_request.py
Last active November 4, 2025 04:29
Batch processing for stable-diffusion-webui API with sd-webui-controlnet
import base64
import collections.abc
import glob
import io
import json
import math
import os
from concurrent.futures import ThreadPoolExecutor
from functools import lru_cache
from typing import Any, Dict, Iterable, List, Optional, Tuple, TypeVar
@fatbobman
fatbobman / keyboardAvoiding.swift
Created May 13, 2024 03:49
keyboardAvoiding for List
// by klaytonb
// https://forums.developer.apple.com/forums/thread/699111?answerId=740437022#740437022
import Combine
import SwiftUI
public extension Publishers {
static var keyboardHeight: AnyPublisher<CGFloat, Never> {
let willShow = NotificationCenter.default.publisher(for: UIApplication.keyboardWillShowNotification)
.map { $0.keyboardHeight }
let willHide = NotificationCenter.default.publisher(for: UIApplication.keyboardWillHideNotification)