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

@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active July 14, 2025 23:28
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@jakevdp
jakevdp / discrete_cmap.py
Last active June 1, 2025 11:15
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 June 14, 2025 17:05 — 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()
@gotbletu
gotbletu / ocs-sr
Last active May 6, 2025 16:52
Clonezilla ocs-sr commandline options manpage
Clonezilla (v2.5.0) "ocs-sr" Options
(Reformated for easier reading)
To save or restore image
ocs-sr [OPTION] {MODE} IMAGE_NAME DEVICE
Where MODE is one of
savedisk
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 15, 2025 07:16
set -e, -u, -o, -x pipefail explanation
@francoism90
francoism90 / README.md
Last active June 18, 2025 08:03
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. :)