Skip to content

Instantly share code, notes, and snippets.

View koraykoska's full-sized avatar

Koray Koska koraykoska

View GitHub Profile
@AndyIsHereBoi
AndyIsHereBoi / index.js
Last active March 5, 2025 12:53
Scans Discord for its voice servers.
import dns from 'node:dns';
import fetch from 'node-fetch';
import regions from "./regions.json" assert { type: "json" };
import fs from 'node:fs';
const IPINFO_API_KEY = "key here";
const loops = 15000;
var regionscomplete = {};
@AndyIsHereBoi
AndyIsHereBoi / output.json
Created January 15, 2024 16:40
Discord voice servers as of Jan 15 2024
{
"us-central":[
{
"ip":"138.128.140.253",
"dns":"us-central96.discord.gg",
"city":"Elk Grove Village",
"region":"Illinois",
"country":"US",
"org":"AS49544 i3D.net B.V"
},
@LeZuse
LeZuse / 00_README.md
Last active February 11, 2025 03:08
Install node on Apple Silicon M1 both ARM and x86 (Rosetta)

Node.js on Apple Silicon

Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.

TODO

  • find a way how to run the same node version on both platforms
# run this to determine which firmware the kernal is looking for
modinfo iwlwifi | grep iwlwifi-cc
# example output:
# firmware: iwlwifi-cc-a0-50.ucode
# go https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ and download the firmware
# copy file to /lib/firmware
sudo cp ~/Download/iwlwifi-cc-a0-50.ucode /lib/firmware
@itslukej
itslukej / voice_servers.json
Created March 8, 2020 22:00
List of all of discord's voice servers as of 08-03-2020
[
{
"ip": "185.50.107.211",
"dns": "brazil0.discord.gg",
"city": "Cotia",
"region": "São Paulo",
"country": "BR",
"org": "AS49544 i3D.net B.V"
},
{
@saniaky
saniaky / Readme.md
Last active April 29, 2025 21:46
Docker + nginx-proxy + let's encrypt + watchtower + fail2ban

Complete solution for websites hosting

This gist contains example of how you can configure nginx reverse-proxy with autmatic container discovery, SSL certificates generation (using Let's Encrypt) and auto updates.

Features:

  • Automatically detect new containers and reconfigure nginx reverse-proxy
  • Automatically generate/update SSL certificates for all specified containers.
  • Watch for new docker images and update them.
  • Ban bots and hackers who are trying to bruteforce your website or do anything suspicious.
@JUSTINMKAUFMAN
JUSTINMKAUFMAN / SSE.swift
Created July 1, 2019 17:12
Swift SSE EventSource Server for Vapor
import Foundation
import NIO
import Vapor
/**
SSE EventSource server implementation for Swift Vapor 3
Usage:
```
// Create a route for all incoming SSE connection
@arturdev
arturdev / URLRequest+Multipart.swift
Last active February 21, 2023 18:59
URLRequest with multipart support
//
// URLRequest+Multipart.swift
//
// Created by Artur Mkrtchyan on 1/16/19.
// Copyright © 2019 arturdev. All rights reserved.
//
import Foundation
import MobileCoreServices
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 16, 2025 21:45
set -e, -u, -o, -x pipefail explanation
@nathanfjohnson
nathanfjohnson / String+HTML.swift
Last active November 23, 2021 15:09 — forked from mwaterfall/StringExtensionHTML.swift
Decoding HTML Entities in Swift 4
// Swift 4
// Check out the history for contributions and acknowledgements.
extension String {
/// Returns a new string made by replacing all HTML character entity references with the corresponding character.
///
/// - Returns: decoded string
func decodingHTMLEntities() -> String {
var result = String()
var position = startIndex