Skip to content

Instantly share code, notes, and snippets.

View jkhsjdhjs's full-sized avatar
💭
killing foss projects since 2016™

jkhsjdhjs

💭
killing foss projects since 2016™
View GitHub Profile
@belst
belst / index.html
Last active February 6, 2019 16:30
Visualization of env data
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Weather API</title>
<style>
body {
margin: 0 auto;
@TheFlyingCorpse
TheFlyingCorpse / gist:c7486531ea74ef897220e0eef4edcc0f
Last active August 18, 2020 05:57
Avoid highlights in WeeChat in a specific channel

Install and add a filter to mute any highlights to the word "rune" in #r/leagueoflegends on quakenet.

Autoset is used to make it persistent.

/script install unhighlight.py
/script install buffer_autoset.py
/autosetbuffer add irc.quakenet.#r/leagueoflegends localvar_set_unhighlight_regex rune
@stinger
stinger / Swift3Base64.swift
Created June 17, 2016 14:58
Swift 3: Base64 encoding and decoding strings
//: # Swift 3: Base64 encoding and decoding
import Foundation
extension String {
//: ### Base64 encoding a string
func base64Encoded() -> String? {
if let data = self.data(using: .utf8) {
return data.base64EncodedString()
}
return nil
@hoon
hoon / esp32-example.c
Created December 23, 2017 07:55
Correct place to call tcpip_adapter_set_hostname() to set Wi-Fi client host name in ESP-IDF
ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &sta_config) );
ESP_ERROR_CHECK( esp_wifi_start() );
ESP_ERROR_CHECK(
tcpip_adapter_set_hostname(TCPIP_ADAPTER_IF_STA, "custom-hostname") );
ESP_ERROR_CHECK( esp_wifi_connect() );
@ccormier
ccormier / udp_jitter-client.py
Last active November 17, 2022 15:49
udp ping client and server
#!/usr/bin/env python
import time
import sys
import socket
host = "13.58.55.42" #set to server ip or hostname
port = 25050
number_of_pings = 40
@puppe
puppe / absender.lco
Last active July 30, 2023 20:14
Deutsche Briefvorlage für LaTeX (scrlttr2) (ACHTUNG: Aktualisierte Version jetzt unter https://codeberg.org/puppe/german-latex-letter-template/)
\ProvidesFile{absender.lco}
\KOMAoptions{%
% fromemail=true, % Email wird im Briefkopf angezeigt
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt
% fromfax=true, % Faxnummer wird im Briefkopf angezeit
% fromurl=true, % URL wird im Briefkopf angezeigt
% fromlogo=true, % Logo wird im Briefkopf angezeigt
% subject=titled, % Druckt "Betrifft: " vor dem Betreff
locfield=wide, % Breite Absenderergänzung (location)
@motorailgun
motorailgun / idea.md
Last active November 16, 2023 03:13
Installing Windows and Linux into the same partition

Installing Windows and Linux into the same partition

But WHY?

There was a reddit post about installing Arch on NTFS3 partition. Since Windows and Linux doesn't have directories with same names under the /(C:\), I thought it's possible, and turned out it was actually possible.
If you are not familiar to Linux, for example you've searched on Google "how to dualboot Linux and Windos" or brbrbr... you mustn't try this. This is not practical.

Pre-requirements

  • UEFI system
  • Any Linux live-boot CD/DVD/USB... with Linux kernel newer than 5.15
  • Windows installer USB
@belst
belst / rocketguide.md
Last active March 13, 2024 22:09
Deploy Rocket in production

Deploy Rocket using Letsencrypt and nginx

Information

This guide uses the domain your-domain.tld and its www. prefixed version. It starts the rocket application on 127.0.0.1:1337 and as the user www-data. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.

Prerequisites

You need to have nginx, certbot and rust installed.

@TheRealKeto
TheRealKeto / FuturerestoreGuide.md
Last active March 14, 2024 18:46
A guide fully covering the process of using Futurerestore to upgrade, downgrade, or re-restore to an unsigned iOS firmware.

Futurerestore Guide

Futurerestore is a tool that allows users to upgrade, downgrade, or re-restore their iOS device to an unsigned firmware through the use of SHSH2 blobs. This guide will teach you how to use Futurerestore in order to upgrade, downgrade, or re-restore to an unsigned firmware.

Before continuing, keep in mind that this guide is based off of this one, and contains information that can change your device's behavior or even damage it. With that in mind, please read the guide fully, as no one but YOU will be held responsible for any damage caused to your device.

Notes and Hints

Throughout the entirety of this guide, keep in mind that:

  • iOS 13.1.3's SEP and Baseband are NOT compatible with iOS 12.x for all devices. This means that you're NOT able to upgrade, downgrade, or re-restore A10-A12X devices back to iOS 12.x. Attempting to use an incompatible SEP and Baseband will cause Futureresto
@JonnieCache
JonnieCache / spacewar.lst
Created December 11, 2012 12:11
Spacewar PDP1 Source Code
-/macro fio-dec system, june 1963
007652 640500 szm=sza sma-szf
007652 650500 spq=szm i
007652 761200 clc=cma+cla-opr
- define senseswitch A
- repeat 3, A=A+A
- szs A
- term
- define init A,B
- law B