Skip to content

Instantly share code, notes, and snippets.

View 1271's full-sized avatar
💓
I want uppy!

Sergey Zharkov 1271

💓
I want uppy!
View GitHub Profile
@1271
1271 / speedtest.py
Created May 21, 2021 16:20
Speedtest cli
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2012-2015 Matt Martz
# Updated by Sergey (1271)
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
@1271
1271 / gameslist.json
Created February 26, 2021 19:53
Discord Verified Games List
This file has been truncated, but you can view the full file.
[
{
"bot_public": false,
"bot_require_code_grant": true,
"cover_image": "4f0361f7957490d61da116ef6f5ae07e",
"description": "Cut-throat multiplayer running game that pits 4 players against each other, locally and/or online. Run, jump, swing around, and use devious weapons and pick-ups to knock opponents off-screen! One of the most competitive games you'll ever play.",
"developers": [
{
"id": "521816574047420417",
@1271
1271 / readme.md
Created November 6, 2020 17:58
Simple OpenVpn server

Simple OpenVpn server

source

OVPN_DATA="ovpn-data-example-service"
VPN_SERVERNAME="vpn.example.com"
CLIENTNAME="client1"
@1271
1271 / generic.py
Created September 2, 2020 07:59
Python generic example
from typing import TypeVar, Generic, List
import json
T = TypeVar('T')
class Stack(Generic[T]):
def __init__(self) -> None:
self.__items: List[T] = []
@1271
1271 / clear_history.sh
Created August 17, 2019 18:14
Clear bash history dubles
cat ~/.bash_history | awk '!($0 in a) {a[$0];print}' > ~/.bash_history.tmp && mv -f ~/.bash_history.tmp ~/.bash_history
@1271
1271 / keybase.md
Last active February 27, 2019 09:34

Keybase proof

I hereby claim:

  • I am 1271 on github.
  • I am 1271 (https://keybase.io/1271) on keybase.
  • I have a public key ASDHibrs7uibozoY1hnPi-4iqjbUAKcCMNp1nZ9q_zq5MAo

To claim this, I am signing this object:

@1271
1271 / youtube-url-extractor.php
Created January 28, 2019 19:01
Youtube url extract
<?php
if (preg_match('%(?:youtube(?:-nocookie)?\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\.be/)([^"&?/ ]{11})%i', $url, $match)) {
$video_id = $match[1];
}
@1271
1271 / twitch-grabber.py
Last active June 5, 2018 12:45
twitch smiles downloader
from argparse import ArgumentParser
from multiprocessing import cpu_count
from os import path, makedirs
from threading import Thread
from progressbar import ProgressBar
from requests import get
args = ArgumentParser()
args.add_argument_group('General')
@1271
1271 / abookru_com.py
Last active April 27, 2018 10:33
abookru.com tracks downloader
import logging
import re
from argparse import ArgumentParser
from base64 import b64decode
from datetime import datetime
from multiprocessing import cpu_count
from os import makedirs
from os.path import basename, isdir, isfile, getsize, join
from sys import stderr
from threading import Thread
language: php
php:
- '7.0'
- nightly
matrix:
include:
# Eloquent bridge
- php: '7.0'