Skip to content

Instantly share code, notes, and snippets.

View KarimJedda's full-sized avatar
🥔
Potatoes

Karim KarimJedda

🥔
Potatoes
View GitHub Profile
{
"number": "12625076",
"hash": "0xa8f06e72b794bea8bcd4abfa8cde2885384ba643805a4f2d123c38e30180931c",
"parentHash": "0xe9ef54b31f8b8e5a2439f5f246665ab7b2d1c06ea4c88c72a239672eed217cfe",
"stateRoot": "0xcd12d0307c83bdbf26c12236a915d21ce3309ee276139c4b68dc9646cbe9aade",
"extrinsicsRoot": "0x001816d801329e985613bb0843d1dea04e8d59811d423f0069598e71acdda2db",
"authorId": "5CyFNxtyrQD7DTM5SZZXbgFFsognawAGmGZ8pgMBtxyL2mYS",
"logs": [
{
"type": "PreRuntime",
dune.androidcat.dataset_dotlake_average_votes_gov_1_vs_open_gov_2023
dune.androidcat.dataset_dotlake_gov_1_number_of_referenda_by_outcome_2023
dune.androidcat.dataset_dotlake_monthly_transactions
dune.androidcat.dataset_dotlake_number_of_treasury_proposals_gov1_vs_open_gov_2023
dune.androidcat.dataset_dotlake_open_gov_monthly_capital_by_type_no_conviction_2023
@KarimJedda
KarimJedda / answerfile
Created April 15, 2022 16:25
QEMU answerfile - Docker on Android
# fr for french :)
KEYMAPOPTS="fr fr"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
@KarimJedda
KarimJedda / gatt.py
Last active April 5, 2022 14:05
Smooth Q3 Debug
import pygatt
# pip install pygatt
import logging
from binascii import hexlify
import time
from itertools import repeat
import re
def string_to_bytearr_repr(value):
a = re.findall('..', value)
@KarimJedda
KarimJedda / docker.md
Created February 28, 2022 21:32 — forked from FreddieOliveira/docker.md
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@KarimJedda
KarimJedda / meta-tags.md
Created January 28, 2022 18:26 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags
@KarimJedda
KarimJedda / hngen.py
Last active September 27, 2021 12:51 — forked from grantslatton/hngen.py
A program that uses Markov chains to generate probabilistic Hacker News titles.
# coding: utf8
import urllib.request
import re
import sys
from collections import defaultdict
from random import random
import time
"""
# No need to run this
@KarimJedda
KarimJedda / ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
Created January 4, 2021 04:02 — forked from Brainiarc7/ffmpeg-livestream-to-streaming-sites-vaapi-nvenc.md
ffmpeg livestreaming to youtube via Nvidia's NVENC and Intel's VAAPI on supported hardware

Streaming your Linux desktop to Youtube and Twitch via Nvidia's NVENC and VAAPI:

Considerations to take when live streaming:

The following best practice observations apply when using a hardware-based encoder for live streaming to any platform:

  1. Set the buffer size (-bufsize:v) equal to the target bitrate (-b:v). You want to ensure that you're encoding in CBR mode.

  2. Set up the encoders as shown:

@KarimJedda
KarimJedda / loggingsqlite.service
Created June 13, 2020 12:13
Nginx to Sqlite Logger Service
[Unit]
Description=Nginx Sqlite Logging service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=logger
ExecStart=/bin/bash /home/logger/logging.sh &> /var/log/sqliter/errors.log
@KarimJedda
KarimJedda / init_sqlite_logger.sh
Created June 11, 2020 18:57
Create sqlite Database
sqlite3 /home/logger/logs.db "create table todo (ip TEXT, timestamp TEXT, status_code TEXT, bytes_sent TEXT, request_method TEXT, request_url TEXT, request_protocol TEXT, referrer TEXT, user_agent TEXT);"