Skip to content

Instantly share code, notes, and snippets.

@ksnabb
ksnabb / wgs84-distance.js
Created April 25, 2014 07:23
JavaScript: WGS84 distance (Harvesin)
/*
Pass in two WGS84 points as arrays in x y order to calcuate the
meter distance between them.
distance([longitude1, latitude1], [longitude2, latitude2])
The distance is calculated with the help of the harvesin formula
*/
var distance = function(coords1, coords2) {
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 12:11
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@cdseoo
cdseoo / emeditor.key
Created May 19, 2023 00:17
emeditor v22 lifetime key
DEMZF-UCKEE-HB222-DJDDH-594U5
DMAZF-UCKEE-A6222-8CADP-HQZ7H
DPAZF-UCKEE-FH222-ET546-DLRGT
DRNZF-UCKEE-UK222-RWNLU-XVZH7
DSBZF-UCKEE-BF222-K24JB-S9JLC
DSHZF-UCKEE-D3222-NMB93-UKSQF
DTHZF-UCKEE-BW222-Q2BKZ-NXPU8
DVAZF-UCKEE-J7222-5UHCT-QSRFE
DVEZF-UCKEE-PR222-ZAPFE-4C49Q
#!/usr/bin/env python3
'''
always getting the most recent frame of a camera
================================================
Usage:
------
freshest_camera_frame.py
@ALEXOTANO
ALEXOTANO / stable-difusion-styles.csv
Last active April 28, 2024 12:06
List of Styles for Stable Difusion
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 7.
name,prompt,negative_prompt
"Style: Enhance","breathtaking {prompt} . award-winning, professional, highly detailed","ugly, deformed, noisy, blurry, distorted, grainy"
"Style: Anime","anime artwork {prompt} . anime style, key visual, vibrant, studio anime, highly detailed","photo, deformed, black and white, realism, disfigured, low contrast"
"Style: Photographic","cinematic photo {prompt} . 35mm photograph, film, bokeh, professional, 4k, highly detailed","drawing, painting, crayon, sketch, graphite, impressionist, noisy, blurry, soft, deformed, ugly"
"Style: Digital art","concept art {prompt} . digital artwork, illustrative, painterly, matte painting, highly detailed","photo, photorealistic, realism, ugly"
"Style: Comic book","comic {prompt} . graphic illustration, comic art, graphic novel art, vibrant, highly detailed","photograph, deformed, glitch, noisy, realistic, stock photo"
"Style: Fantasy art","ethereal fantasy concept art of {prompt} . magnificent, celestial, ethereal, painterly, epic, majestic, magic
@royshil
royshil / ffmpeg_concat_xfade.py
Last active April 28, 2024 12:06
A video concatenation tool based on FFMPEG with crossfade between the segments (with the `xfade` filter)
#!/usr/local/bin/python3
import argparse
import subprocess
import itertools
parser = argparse.ArgumentParser(description='Concatenate videos with FFMPEG, add "xfade" between segments.')
parser.add_argument('--segments_file', '-f', metavar='Segments file', type=str, nargs=1,
help='Segments text file for concatenating. e.g. "segments.txt"')
@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?