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/env python | |
# Simple Telegram Bot to send XBT price changes | |
# @vova_sergeevich | |
from urllib import urlencode | |
import datetime | |
import subprocess | |
from urllib import urlretrieve | |
import time | |
import sys, os |
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 | |
# TOGGLING APP BADGE ICONS | |
# application bundle ids, that need to disable/enable badge app notifications | |
bundle_ids=(com.skype.skype com.viber.osx com.adiumX.adiumX com.getdropbox.dropbox com.evernote.Evernote com.apple.FaceTime com.apple.iTunes com.apple.mail com.apple.Maps com.apple.Photos com.tinyspeck.slackmacgap ru.keepcoder.Telegram com.shazam.mac.Shazam) | |
# "Usernoted" = "user notifications daemon", getting its PID. | |
pid=$(ps aux | grep -i [u]sernoted | awk '{print $2}') | |
# Finding notification center db |
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
from flask import Flask, request, current_app | |
from logging.handlers import RotatingFileHandler | |
import logging | |
app = Flask(__name__) | |
@app.route('/', defaults={'path': ''}, methods=["GET", "POST", "PUT", "DELETE"]) | |
@app.route('/<path:path>', methods=["GET", "POST", "PUT", "DELETE"]) | |
def catchall(path): | |
app.logger.info('PATH - ' + str(path)) |