Skip to content

Instantly share code, notes, and snippets.

staeff /
Created Feb 19, 2019 — forked from rca/
Python hashing and test functions for user passwords stored in OpenLDAP.
#!/usr/bin/env python
As seen working on Ubuntu 12.04 with OpenLDAP 2.4.28-1.1ubuntu4
Author: Roberto Aguilar <>
import hashlib
import os
staeff / bundle.css
Created Oct 27, 2017
Angular Cheat Sheet
View bundle.css
.mat-elevation-z0{box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.mat-elevation-z1{box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12)}.mat-elevation-z2{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}.mat-elevation-z3{box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12)}.mat-elevation-z4{box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.mat-elevation-z5{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 5px 8px 0 rgba(0,0,0,.14),0 1px 14px 0 rgba(0,0,0,.12)}.mat-elevation-z6{box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12)}.mat-elevation-z7{box-shadow:0 4px 5px -2px rgba(0,0,0,.2),0 7px 10px 1px rgba(0,0,0,.14),0 2px 16px 1px rgba(0,0,0,.12)}.mat-elevation-z8{box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba
staeff / style.scss
Created Jan 30, 2017
Write BEM with SASS. BEM modules can be nested using the & to prefix our elements or modifiers
View style.scss
/* Sass 3.3+ w/BEM: */
.object {
color: red;
&__descendant {
color: black;
/* Generates:
View index.html
<!DOCTYPE html>
<link href="//" rel="stylesheet" type="text/css" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
[data-icon]:before {
font-family: 'FontAwesome';
content: attr(data-icon);
staeff /
Last active Oct 30, 2021
Understanding module exports in node.js
staeff / gist:29254ee242b860740487
Last active Mar 14, 2016 — forked from blairg23/gist:dc421453b035321a5e27
Oauth Example Authentication with Flickr using requests_oauthlib in Python
View gist:29254ee242b860740487
import requests_oauthlib
api_key = <api_key_here>
api_secret = <api_secret_here>
# OAuth URLs
request_token_url = ''
access_token_url = ''
authorization_url = ''
staeff / index.html
Last active Nov 2, 2017
Wikimedia API calls
View index.html
<a href='' class='bootstrap_oembed'></a>
staeff /
Created Mar 5, 2016
Skyscanner browse quotes
import json
import requests
from pprint import pprint
API_KEY = 'hier dein api key'
def get_currencies():
""" Get the list of valid currencies supported by Skyscanner """
url = '{0}'.format(API_KEY)
return requests.get(url)
staeff /
Last active Feb 6, 2017
Get and process (oembed) data from flickr and wikimedia
  • Flickr
  • Wikimedia