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

@davecan
davecan / open_powershell_here.md
Last active May 3, 2024 16:45
How to enable "Open PowerShell Here" context menu in Windows 10
@rodrigoborgesdeoliveira
rodrigoborgesdeoliveira / ActiveYouTubeURLFormats.txt
Last active May 23, 2024 10:17 — 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 June 8, 2024 03:01
set -e, -u, -o, -x pipefail explanation
@francoism90
francoism90 / README.md
Last active May 29, 2024 13:16
Change country to unlock channels, increase TX-power. (Use at your own risk)

Warning

Following instructions are provided without any warranty, and may even get you in trouble legally. The instructions are provided for testing, and should be use with care. We (including commentators) are not responsible for any damage to your device(s).

Introduction

This may enable additional channels and power (in most cases don't) on ASUS Merlin provided routers.

@Quick104
Quick104 / readme.md
Last active May 24, 2024 20:05
Expose a server behind CG:NAT via Wireguard
@gmag11
gmag11 / rclone-mount@.service
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
@asuna
asuna / cloudflare_update.script
Last active May 5, 2024 14:33 — forked from viritt/cloudflare_update.script
Automatic script for Mikrotik RouterOS updating record on CloudFlare.
#########################################################################
# ================================================== #
# $ Mikrotik RouterOS update script for CloudFlare $ #
# ================================================== #
# #
# - You need a CloudFlare account & api key (look under settings), #
# a zone and A record in it #
# - All variables in first section are obvious, except CFid, #
# To obtain CFzoneid use following command in any unix shell: #
# curl -X GET "https://api.cloudflare.com/client/v4/zones" -H "X-Auth-Email: YOUR_EMAIL" -H "X-Auth-Key: YOUR_API_KEY" -H "Content-Type: application/json" | python -mjson.tool