Skip to content

Instantly share code, notes, and snippets.

View notpushkin's full-sized avatar
🕊️

Alexander Pushkov notpushkin

🕊️
View GitHub Profile
Fight Back - Neffex
Run Run Blood - Phantogram
Mein schönster Tag in deinem Leben - Rakede
Black Cats Ft Drakezilla & Saving Grace - Mind Over Matter
Still Alive (Teddybears Mix) - Lisa Miskovsky
6.24 - Danger
One Touch - VIP - Baauer
Pi - Käptn Peng
Birds In The Sky - Bliss n Eso
Black Barbies - Nicki Minaj
@nakanod
nakanod / .docker.env
Last active April 11, 2020 15:00
Pleroma docker files
HOST=pleroma.example.com
SECRET_KEY_BASE=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@simonw
simonw / recover_source_code.md
Last active January 16, 2024 08:13
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@LunaSquee
LunaSquee / queue.js
Last active February 16, 2023 01:52
Liquidsoap radio + youtube-dl queueing (Node.js as helper)
// $ node queue <file name or youtube URL>
const net = require('net')
let client = net.connect(1234, 'localhost')
client.on('connect', function () {
if (process.argv[2]) {
console.log('Queueing ' + process.argv[2])
client.write('queue.push smart:' + process.argv[2] + '\r\n')
}
@sfan5
sfan5 / ttml2ass.py
Last active December 6, 2021 16:40
Converts TTML (XML) subtitles to SSA/ASS format
#!/usr/bin/env python3
import sys
from xml.dom.minidom import parseString
COLORS = { # TODO more colors
"white" : "FFFFFF",
"black" : "000000",
"yellow" : "FFFF00",
"green" : "00FF00",
"cyan" : "00FFFF",
— Мержь код, блядь, на. Мержь код.
— Чем, vimdiff что ли?
— Мержь. Мержь код! Садись уже. Садись! Мержь!
— Блядь.
— Чтобы чисто было!
— Как я буду vim'ом-то мержить?
— Мержь!
— Покажи мне, как!
— Мержь! (Уходит.)
— Что «мержи», ёпта, как я буду vim-то мержить?! Чё, совсем мудак что ли, покажи мне, как я буду мержить-то, ёпта!
@roadrunner2
roadrunner2 / 0 Linux-On-MBP-Late-2016.md
Last active February 29, 2024 16:29
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@developit
developit / compositional-components-demo.js
Created January 7, 2017 22:44
Demonstrates compositional components in Preact (or React). Live demo: https://jsfiddle.net/developit/umnb4y87/
import { h, cloneElement, Component } from 'preact';
/** Example <Fetch url="/foo.json" /> compositional component.
* Just to demonstrate a compositional component that requires input massaging.
*/
class Fetch extends Component {
state = { loading: true };
componentDidMount() {
this.update();
anonymous
anonymous / xiaomi-locked-bootloader.md
Created January 6, 2017 00:06
Xiaomi's locked bootloader is insecure and useless

Xiaomi's locked bootloader is insecure and useless

Your phone should have a locked bootloader, as it ensures the integrity of the software running on the device. This is especially relevant for Xiaomi phones, which are often loaded with all sorts of crapware by shady merchants. These vendor ROM's are a serious security risk. You really don't want to run that shit, so do your research very carefully when importing a Xiaomi device to ensure it hasn't been tampered with.

So, Xiaomi makes these nice phones and those vendors just ruin it all. They do the logical thing and start locking devices. But even today, vendor ROM's are still a thing! Even the brand new edgeless Mi Mix isn't safe.

How is this possible?

Through a wide open back door called EDL mode. To flash anything you want, all you need is a "deep flash cable" from [Aliexpress](https://www.aliexpress.com/wholesale?catId=0&amp;SearchText=xiaomi+deep+fl

@justjanne
justjanne / Price Breakdown.md
Last active April 11, 2024 22:21 — forked from kylemanna/price.txt
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Permalink: git.io/vps

$5/mo

Provider Type RAM Cores Storage Transfer Network Price