Skip to content

Instantly share code, notes, and snippets.

@htp
htp / curl-websocket.sh
Last active May 7, 2024 17:08
Test a WebSocket using curl.
curl --include \
--no-buffer \
--header "Connection: Upgrade" \
--header "Upgrade: websocket" \
--header "Host: example.com:80" \
--header "Origin: http://example.com:80" \
--header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
--header "Sec-WebSocket-Version: 13" \
http://example.com:80/
@Skarlso
Skarlso / main.go
Created February 16, 2019 21:31
Golang SSH connection with hostkey verification
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"golang.org/x/crypto/ssh"
kh "golang.org/x/crypto/ssh/knownhosts"
@RyanBalfanz
RyanBalfanz / llm_webui.py
Created April 16, 2024 02:31
Initial LLM WebUI
import json
import urllib.parse
from dataclasses import InitVar, dataclass
from datetime import datetime, timedelta
from typing import Protocol
import httpx
import llm
import streamlit as st

Windows Development Setup

I love Linux. But the NVIDIA drivers are broken on Wayland (again), and I need to work to be able to pay my rent.

So let's dive deep into this, by configuring this nice operating system that's pinning TikTok and Candy Crush Saga to my start menu.

@barseghyanartur
barseghyanartur / convert_mysql_dump_to_postgresql_dump.md
Created June 11, 2020 14:21
Convert MySQL dump to PostgreSQL dump

Prepare database dump using mysqldump:

mysqldump -u [username] -p [databaseName] --compatible=postgresql --default-character-set=utf8 > database.sql

Clone mysql-postgresql-converter project:

git clone git@github.com:lanyrd/mysql-postgresql-converter.git
@HQarroum
HQarroum / socat-adb-forwarding.sh
Last active May 7, 2024 17:05
Using socat to forward traffic from a network interface to the loopback address on which ADB is listening.
#!/bin/bash
set -e
# Installing required packages for the Android SDK
# and the emulator.
sudo apt update -y && \
DEBIAN_FRONTEND=noninteractive sudo apt install -y --no-install-recommends \
socat \
iproute2
@dideler
dideler / bot.rb
Last active May 7, 2024 17:05
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@williamd1k0
williamd1k0 / EditorIconTexture.gd
Created May 6, 2024 23:46
Helper Texture class to use Godot Editor icons in plugins, such as main screen plugins.
@tool
class_name EditorIconTexture
extends AtlasTexture
var icon :String:
set(val):
icon = val
_update_icon.call_deferred()
func _init():
@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 7, 2024 17:01
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@sundowndev
sundowndev / GoogleDorking.md
Last active May 7, 2024 16:59
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"