This file contains 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
from logging import basicConfig, DEBUG, debug | |
from threading import Lock, Thread, current_thread, enumerate | |
from time import sleep | |
from random import random | |
basicConfig(level=DEBUG, format='[%(thread)d: %(message)s]') | |
class Counter(object): | |
def __init__(self, start=0): |
This file contains 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/python3 | |
""" | |
Recursively look for images inside a source folder | |
and create flat symlinks inside a destination folder. | |
""" | |
from argparse import ArgumentParser | |
from os import walk | |
from pathlib import Path |
This file contains 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
# Package generated configuration file | |
# See the sshd_config(5) manpage for details | |
# What ports, IPs and protocols we listen for | |
Port 22 | |
# Use these options to restrict which interfaces/protocols sshd will bind to | |
#ListenAddress :: | |
#ListenAddress 0.0.0.0 | |
Protocol 2 | |
# HostKeys for protocol version 2 |
This file contains 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
function repo() { | |
if [ $# -eq 2 ]; then | |
# name of repo to be created | |
PROJECTNAME="$1" | |
DESCRIPTION="$2" | |
POST="{\"name\":\"$PROJECTNAME\",\"description\":\"$DESCRIPTION\"}" | |
curl –sS -u 'cyberbikepunk' https://api.github.com/user/repos -d "$POST" | |
git remote add origin git@github.com:cyberbikepunk/$PROJECTNAME.git | |
echo "remote origin added" | |
else |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# Write a tracer decorator | |
class Tracer(): | |
def __init__(self): | |
pass | |
def __call__(self, f): | |
def wrapper(*args, **kwargs): | |
print('Called function %s' % f.__name__) | |
return f(*args, **kwargs) | |
return wrapper |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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/env python | |
# coding=utf-8 | |
from __future__ import print_function | |
import functools | |
import json | |
import os | |
import re | |
import sys |
OlderNewer