Skip to content

Instantly share code, notes, and snippets.

@idleberg
idleberg / vscode-macos-context-menu.md
Last active May 21, 2024 00:30
“Open in Visual Studio Code” in macOS context-menu

Open in Visual Studio Code

  • Open Automator
  • Create a new document
  • Select Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
    • your default shell should already be selected, otherwise use /bin/zsh for macOS 10.15 (”Catalina”) or later
    • older versions of macOS use /bin/bash
  • if you're using something else, you probably know what to do 😉
@denji
denji / nginx-tuning.md
Last active May 21, 2024 00:30
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@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)
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
@roaldnefs
roaldnefs / mac-docker-gui.txt
Created December 22, 2019 10:27
Running GUI application in Docker on MacOS
# Install XQuartz
brew cask install xquartz
# Restart MacOS
# Open XQuartz
open -a XQuartz
# Ensure the "Allow connections from network clients" option in Preferences >> Security is turned on
@naiieandrade
naiieandrade / emojis_unicode.md
Last active May 21, 2024 00:09
Unicode emojis for Telegram
emoji unicode emoji unicode
✒️ :black_nib: \U00002712 ✔️ :heavy_check_mark: \U00002714
✖️ :heavy_multiplication_x: \U00002716 ‼️ :bangbang: \U0000203C
✳️ :eight_spoked_asterisk: \U00002733 :sparkles: \U00002728
:grey_exclamation: \U00002755 ✴️ :eight_pointed_black_star: \U00002734
❄️ :snowflake: \U00002744 ❇️ :sparkle: \U00002747
:x: \U0000274c :negative_squared_cross_mark: \U0000274e
@wagyourtail
wagyourtail / bypass-disable-devtool.js
Last active May 21, 2024 00:06
bypass disable-devtool
// ==UserScript==
// @name Bypass Detect-Devtool
// @namespace http://tampermonkey.net/
// @version 0.1
// @description bypass https://github.com/theajack/disable-devtool
// @author Wagyourtail
// @match {site}
// @icon https://www.google.com/s2/favicons?sz=64&domain=github.io
// @grant none
// ==/UserScript==
@mdonkers
mdonkers / server.py
Last active May 21, 2024 00:06
Simple Python 3 HTTP server for logging all GET and POST requests
#!/usr/bin/env python3
"""
License: MIT License
Copyright (c) 2023 Miel Donkers
Very simple HTTP server in python for logging requests
Usage::
./server.py [<port>]
"""
from http.server import BaseHTTPRequestHandler, HTTPServer
@davidmc971
davidmc971 / config.yml
Created January 30, 2022 14:45
My Trafik 2 Setup using Let's Encrypt Wildcard Certificates with Cloudflare
# config.yml in traefik directory
# Dynamic Configuration for Dashboard
http:
routers:
dashboard:
# Your domain here
rule: Host(`traefik-dashboard.example.com`)
service: api@internal
middlewares:
- auth
@0xdevalias
0xdevalias / reverse-engineering-macos.md
Last active May 20, 2024 23:55
Some notes, tools, and techniques for reverse engineering macOS binaries