Skip to content

Instantly share code, notes, and snippets.

View mrtopf's full-sized avatar

Christian Scholz mrtopf

View GitHub Profile
@mrtopf
mrtopf / bot3.py
Last active April 27, 2016 09:28
from flask import Flask
from flask import request
import requests
import json
PAGE_TOKEN="please use your own token here"
app = Flask(__name__)
@app.route('/testbot', methods=["GET"])
@mrtopf
mrtopf / testmessage.js
Created April 25, 2016 16:23
Bot-Antwort an den Nutzer
{
'message': {
'text': 'Toll, Du hast folgendes gesagt: Hallo'
},
'recipient': {
'id': 875317532580370
}
}
@mrtopf
mrtopf / gist:9c2220729a7b7cff683f290597470cff
Created April 25, 2016 15:56
Eine Nachricht an den Bot
{'entry': [{'id': 1779681335651753,
'messaging': [{'message': {'mid': 'mid.1461599731432:95a28608b48b993283',
'seq': 6,
'text': 'Hallo Bot!'},
'recipient': {'id': 1779681335651753},
'sender': {'id': 875317532580370},
'timestamp': 1461599731441}],
'time': 1461599731622}],
'object': 'page'}
@mrtopf
mrtopf / bot2.py
Created April 25, 2016 15:35
Ein Messenger-Bot, der die Webhook-Challenge erfüllt.
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/testbot', methods=["GET"])
def confirm():
if request.args['hub.verify_token'] == "cd7czs87czds8chsiuh9eh3k3bcjhdbjhb":
return request.args['hub.challenge']
return 'Hello World!'
@mrtopf
mrtopf / bot1.py
Last active April 24, 2016 08:38
Test-Script für den Messenger-Bot-Server
from flask import Flask
from flask import request
app = Flask(__name__)
@app.route('/testbot', methods=["GET"])
def confirm():
return 'Hello World!'
if __name__ == '__main__':
@mrtopf
mrtopf / entworldmac
Created June 29, 2015 09:20
How to run EntWorld on Mac with MultiMC
Here is what you have to do:
1. Install MultiMC (https://multimc.org/)
2. Click Accounts in top right corner and add your MC account
3. Add a new instance (first icon), select Minecraft 1.7.10
4. Click on "Edit instance" after selecting your new instance
5. Click "Install Forge" and select 1448
6. Close the edit window
7. Open the Instance Folder ("Instance Folder" on the right)
8. Open the minecraft/ folder
@mrtopf
mrtopf / committee.json
Created July 3, 2013 14:58
committee-Beispiel
{
"_id" : 30,
"last_session_id" : null,
"name" : "Betriebsausschuss Aachener Stadtbetrieb",
"next_session" : ISODate("2013-06-05T00:00:00Z"),
"address" : {
"name" : "Michaela Landskron",
"url" : "http://www.aachen.de",
"lines" : [
"Aachener Stadtbetrieb",
@mrtopf
mrtopf / meeting.json
Created July 3, 2013 14:53
Sitzung in JSON
{
"_id" : 2839,
"link_to" : "to010.asp?SILFDNR=2839options=8",
"sisbvcs" : "20130626T150000Z",
"siseo" : "0",
"sblfdnr" : "200",
"sbtele" : "0241-4327233",
"special" : {
"siseo" : "0",
"siost" : "öffentlich/nichtöffentlich",
@mrtopf
mrtopf / top.json
Created July 3, 2013 14:47
Beispiel für einen TOP
{ "_id" : "57508", "selfName" : "Musterstadt", "link_to" : "to010.asp?SILFDNR=2879&options=8", "nowTime" : "16:18:41", "rtfBS" : null, "nowDate" : "2456466", "selfNameFull" : "Stadt Musterstadt", "sbtele" : "92034532 ", "selfBase" : "http://ratsinfo.aachen.de/bi/", "selfUrl" : "to020.asp?selfaction=ws&template=xyz&TOLFDNR=57508", "sbname" : "Gunkelmann ", "nowTimeUTC" : "14:18:41", "grname" : "Bezirksvertretung Aachen-Brand", "sbemail" : " ", "selfMail" : "[email protected]", "saname" : "Öffentliche/Nichtöffentliche Sitzung", "sisbe" : "17:00 - 19:10", "rtfAE" : null, "description" : "Exportiert aus ALLRIS am 22.06.2013\\n\\n\\nDie Sitzung in ALLRIS net:\\nhttp://ratsinfo.aachen.de/bi/to010.asp?SILFDNR=2879&options=8", "sise" : "19:10", "toostKurz" : "Ö", "sisb" : "17:00", "count0" : "0", "totyp" : "(offen)", "transcript" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p style=\"font-size:10pt; line-height:150%; margin:0pt\"><span
{'_id': '11199',
'betreff': 'Industriepark Rothe Erde - Stand der Altlastensanierung',
'consultation': [{'action': 'Kenntnisnahme',
'committee': u'Ausschuss f\xfcr Umwelt und Klimaschutz',
'date': time.struct_time(tm_year=2013, tm_mon=7, tm_mday=2, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=1, tm_yday=183, tm_isdst=-1),
'decision': u'',
'meeting': u'UmA/36/WP.16\xa0\xf6ffentliche/nicht\xf6ffentliche Sitzung des Ausschusses f\xfcr Umwelt und Klimaschutz',
'silfdnr': '2846',
'status': 'erledigt',
'toplfdnr': None}],