Skip to content

Instantly share code, notes, and snippets.

@DerBunteBall
DerBunteBall / README.md
Created April 21, 2018 19:13 — forked from MoOx/README.md
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
title tags authors
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily
git
github
gitlab
bitbucket
MoOx

Forward GnuPG agent from macOS to Linux

On the remote machine

Run gpg once as your to create the directory structure

gpg --list-keys

For headless systemd based hosts

@DerBunteBall
DerBunteBall / graphql_example.py
Created June 23, 2021 18:54 — forked from gbaman/graphql_example.py
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200:
@DerBunteBall
DerBunteBall / README.md
Created August 26, 2021 21:23 — forked from matusnovak/README.md
GPG + Git SSH Authentication and Signing on Windows 10

GPG + Git SSH Authentication and Signing on Windows 10

Introduction

This simple Gist will explain how to settup your GPG key to work for SSH authentication (with Git) and Git commit signing on Windows 10. This may seem straightforward on Linux, but there are certain tweaks needed on Windows.

No Cygwin, no MinGW, no Git Bash or any other Linux emulated environment. This works in pure Windows 10.

Software needed

@DerBunteBall
DerBunteBall / WSL-ssh-server.md
Created August 28, 2021 20:39 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@DerBunteBall
DerBunteBall / http-client.py
Created May 12, 2022 22:14 — forked from berlincount/http-client.py
Twisted HTTP client example with parallel requests, timeouts and authentication
#!/usr/bin/env python
from twisted.internet import defer, reactor
from twisted.internet.protocol import Protocol
from twisted.web.client import Agent
from twisted.web.http_headers import Headers
def run():
# create some requests for parallel execution
@DerBunteBall
DerBunteBall / pthreads.md
Created September 24, 2022 08:05 — forked from krakjoe/pthreads.md
pthreads.md

Multi-Threading in PHP with pthreads

A Brief Introduction to Multi-Threading in PHP

  • Foreword
  • Execution
  • Sharing
  • Synchronization
  • Pitfalls
@DerBunteBall
DerBunteBall / ffmpeg.py
Last active October 22, 2022 19:05
ffmpeg two step approach in dirty
#!/usr/bin/env python3
import os
import sys
import json
import signal
import subprocess
import requests
from ffmpy import FFmpeg, FFRuntimeError
@DerBunteBall
DerBunteBall / bot.py
Created November 18, 2022 15:56
StreaMonitor Bot with patched fnction
from __future__ import unicode_literals
import os
from enum import Enum
from time import sleep
from datetime import datetime
from threading import Thread
import requests
import m3u8
import streamonitor.log as log
from parameters import DOWNLOADS_DIR
@DerBunteBall
DerBunteBall / bc.py
Created November 24, 2022 20:29
BC extract and DL
#!/usr/bin/env python3
from datetime import datetime
import sys
import subprocess
import requests
def main():
username = sys.argv[1]