Ctrl + Alt + Space
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PERMISSION="push" # Can be one of: pull, push, admin, maintain, triage | |
ORG="orgname" | |
TEAM_SLUG="your-team-slug" | |
# Get names with `gh repo list orgname` | |
REPOS=( | |
"orgname/reponame" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// loosely based on https://servant.dev | |
// /usr/local/Cellar/gcc/10.2.0/bin/g++-10 -std=c++20 type-level-routes.cpp && ./a.out | |
#include <iostream> | |
#include <string> | |
// FixedString from https://www.reddit.com/r/cpp/comments/bhxx49/c20_string_literals_as_nontype_template/ | |
template<unsigned N> | |
struct FixedString { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# Author: Alejandro M. BERNARDIS | |
# Email alejandro.bernardis at gmail dot com | |
# Created: 2020-06-07 | |
### debug ###################################################################### | |
typeset -gr LOG_LEVEL_OFF=0 | |
typeset -gr LOG_LEVEL_FATAL=1 | |
typeset -gr LOG_LEVEL_CRITICAL=2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
The most simple DNS client written for Python with asyncio: | |
* Only A record is support (no CNAME, no AAAA, no MX, etc.) | |
* Almost no error handling | |
* Doesn't support fragmented UDP packets (is it possible?) | |
""" | |
import asyncio | |
import logging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import threading | |
import gc | |
from time import sleep | |
lock = threading.RLock() | |
def target(): | |
print 'target' | |
with lock: | |
sleep(2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Usage: grep [OPTION]... PATTERN [FILE] ... | |
Search for PATTERN in each FILE or standard input. | |
Example: grep -i 'hello world' menu.h main.c | |
Regexp selection and interpretation: | |
-E, --extended-regexp PATTERN is an extended regular expression | |
-F, --fixed-strings PATTERN is a set of newline-separated strings | |
-G, --basic-regexp PATTERN is a basic regular expression |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import macropy.activate | |
import test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import contextlib | |
import os.path | |
import socket | |
import ssl | |
import unittest | |
from tornado.iostream import SSLIOStream | |
from tornado import netutil, testing | |
from tornado.testing import AsyncTestCase, bind_unused_port |
NewerOlder