Skip to content

Instantly share code, notes, and snippets.

View nop33's full-sized avatar
🏗️
Building at @alephium

Ilias Trichopoulos nop33

🏗️
Building at @alephium
View GitHub Profile
from lxml import etree
from flask import Flask, request
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World!"
@nop33
nop33 / reservation_list_csv.py
Created December 15, 2016 15:19 — forked from pferreir/reservation_list_csv.py
CSV list of booking occurrences for a set of rooms
from io import BytesIO
import csv
import sys
from pytz import timezone
from indico.modules.rb.models.reservations import RepeatMapping
tz = timezone('Europe/Zurich')
room_ids = {96, 336, 97, 98}
@nop33
nop33 / 502.html
Created August 9, 2016 12:09 — forked from OmeGak/502.html
NGINX 502 autoreload
<head>
<title>502 Bad Gateway</title>
</head>
<body>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx</center>
<script>
function tryRefresh() {
var xhr = new XMLHttpRequest();
@nop33
nop33 / cern_afs_kerberos.md
Created July 25, 2016 13:47 — forked from OmeGak/cern_afs_kerberos.md
Authentication at CERN made not-an-ordeal (kind of)

AFS Kerberos at CERN

"Kerberos is not the authentication system CERN deserves, but the one we need". - A wise man

This guide aims to ease the pain of setting up Kerberos authentication in your local (Ubuntu) machine and then completely forget about it.

Ready to fight?

First of all, install the following packages if you want to be successful on this journey:

@nop33
nop33 / zombislayer.py
Created April 29, 2016 10:02
Slays zombi events in a category
from BTrees.OOBTree import OOTreeSet
cat = CategoryManager().getById(5052)
new_conferences = OOTreeSet()
for conf in cat.conferences:
if not EE(conf.getId()).is_deleted:
new_conferences.insert(conf)
else:
cat.unindexConf(conf)