Skip to content

Instantly share code, notes, and snippets.

View mezhgano's full-sized avatar

Dmitry Meshkoff mezhgano

View GitHub Profile
@jkeyoth
jkeyoth / PythonTemplates.py
Created March 5, 2011 05:51
Using templates in python with cheetah
from Cheetah.Template import Template
#The template text. Probably read in from a file for this project, but for an example I'll just use a string
templateDefinition = "This is a template. $exclamation$asdf"
#set up Template object
template = Template(templateDefinition)
#set the exclamation variable.
template.exclamation = "Woohoo"

Disable:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Enable:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

@jakevdp
jakevdp / discrete_cmap.py
Last active January 12, 2025 13:24
Small utility to create a discrete matplotlib colormap
# By Jake VanderPlas
# License: BSD-style
import matplotlib.pyplot as plt
import numpy as np
def discrete_cmap(N, base_cmap=None):
"""Create an N-bin discrete colormap from the specified input map"""
@davecan
davecan / open_powershell_here.md
Last active January 27, 2025 01:16
How to enable "Open PowerShell Here" context menu in Windows 10
@rodrigoborgesdeoliveira
rodrigoborgesdeoliveira / ActiveYouTubeURLFormats.txt
Last active March 15, 2025 13:13 — forked from ScottCooper92/gist:ea11b690ba4b1278e049
Example of the YouTube videos URL formats
http://www.youtube.com/watch?v=-wtIMTCHWuI
http://youtube.com/watch?v=-wtIMTCHWuI
http://m.youtube.com/watch?v=-wtIMTCHWuI
https://www.youtube.com/watch?v=lalOy8Mbfdc
https://youtube.com/watch?v=lalOy8Mbfdc
https://m.youtube.com/watch?v=lalOy8Mbfdc
http://www.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail
http://youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail
http://m.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail
@huangzhuolin
huangzhuolin / flags.py
Created June 28, 2018 12:51
[downloading with concurrent.futures] web downloads in three styles #python
# sequential download script
import os
import time
import sys
import requests
POP20_CC = ('CN IN US ID BR PK NG BD RU JP '
'MX PH VN ET EG DE IR TR CD FR').split()
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 17, 2025 09:00
set -e, -u, -o, -x pipefail explanation
@francoism90
francoism90 / README.md
Last active April 13, 2025 08:00
Change country to unlock channels, increase TX-power. (Use at your own risk)

Disclaimer

Following instructions are provided without any warranty, and may even get you in trouble legally. The instructions are provided for testing, learning, preventing e-waste, and should be use with care. We (including contributers + commentators) are not responsible for any damage to your device(s) or any legal issues.

Getting Started

Instructions have been moved to https://github.com/francoism90/asus-router. :)

@Quick104
Quick104 / readme.md
Last active March 19, 2025 12:55
Expose a server behind CG:NAT via Wireguard
@gmag11
gmag11 / [email protected]
Last active March 27, 2024 04:01
Mount multiple RClone remotes on boot with a single SystemD forking service definition
# Rclone mount on boot
# Copy file to: /etc/systemd/system
# You need to create a remote on RClone and a folder on your disk, both with same name <rclone-remote>
# This example uses /cloud/ folder as origin to mount all remotes, change it to your needs
# This example use a linux user named rclone. Create it or adapt it to your needs. Rclone will get config from that user's home folder
# Register new service by typing:
# sudo systemctl daemon-reload
# Do the next one for every remote you want to load on boot
# sudo systemctl enable rclone-mount@<rclone-remote>.service
# systemctl start rclone-mount@<rclone-remote>.service