Skip to content

Instantly share code, notes, and snippets.

View scaleflake's full-sized avatar
🏠
Working from home

scaleflake scaleflake

🏠
Working from home
View GitHub Profile
@ksafranski
ksafranski / Common-Currency.json
Last active July 12, 2024 09:44
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@oaleynik
oaleynik / deepEqual_Mongoose.js
Created October 7, 2013 14:44
Deep Equality from Mongoose
exports.deepEqual = function deepEqual (a, b) {
if (a === b) return true;
if (a instanceof Date && b instanceof Date)
return a.getTime() === b.getTime();
if (a instanceof ObjectId && b instanceof ObjectId) {
return a.toString() === b.toString();
}
@steve-ng
steve-ng / nginx.conf
Last active May 28, 2024 08:27
Nginx reverse proxy wss with ssl
server {
listen 443 ssl;
server_name xxx.xx.io
ssl on;
ssl_certificate /etc/asterisk/certs/xxx.io.pem;
ssl_certificate_key /etc/asterisk/certs/xxx.io.key;
ssl_session_timeout 5m;
@IngoMeyer441
IngoMeyer441 / x-resize
Last active June 22, 2024 11:55 — forked from manuuurino/x-resize
Manual Implementation of Auto Resizing For Non-Gnome Environments (like XFCE) running under Spice/Libvirt
#!/bin/bash
# Steps:
# 1) Make sure bash is available
# 2) Create udev rule
# - path to new udev rule: /etc/udev/rules.d/50-x-resize.rules
# - udev rule content:
# ACTION=="change", KERNEL=="card[0-9]*", SUBSYSTEM=="drm", RUN+="/usr/local/bin/x-resize"
# 3) Create /var/log/autores directory
# 4) Create script /usr/local/bin/x-resize (this file) and make executable
# 5) Reload udev rules with `sudo udevadm control --reload-rules`