Skip to content

Instantly share code, notes, and snippets.

import time
import telepot
from telepot.namedtuple import ReplyKeyboardMarkup,InlineKeyboardMarkup,InlineKeyboardButton
TOKEN = 'Put your token here'
previous_message = {}
def handle(msg):
info = telepot.glance(msg)
if msg['text'] =='/start':
@Smosker
Smosker / commit-msg
Last active October 20, 2017 10:47
cd .git
!/bin/sh
NAME=$(git branch | grep '*' | grep -o "[A-Z0-9-]\+")
DESCRIPTION=$(git config branch."$NAME".description)
TEXT=$(cat "$1" | sed '/^#.*/d')
if [ -n "$TEXT" ]
then
echo "$NAME"' '$(cat "$1" | sed '/^#.*/d') > "$1"
if [ -n "$DESCRIPTION" ]