Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
..

magnus magnusja

👨‍💻
..
View GitHub Profile
@magnusja
magnusja / gen_mongooseim_scram.py
Last active Feb 26, 2016
This code snippet is able to generate a scram salted password 'hash' in the format and with the necessary information mongooseim expects when using http auth and scram. See http://stackoverflow.com/questions/35652435/mongooseim-ejabberd-http-auth-using-scram and http://mongooseim.readthedocs.org/en/1.6.1/advanced-configuration/HTTP-authenticatio…
View gen_mongooseim_scram.py
# https://tools.ietf.org/html/rfc5802
import base64
import hashlib
import hmac
import sys
from passlib.hash import scram
@magnusja
magnusja / CMakeLists.txt
Created Nov 2, 2015
Arduino CMake example (CLion)
View CMakeLists.txt
cmake_minimum_required(VERSION 2.8.4)
set(CMAKE_TOOLCHAIN_FILE ${CMAKE_SOURCE_DIR}/cmake/ArduinoToolchain.cmake)
set(PROJECT_NAME ard)
project(${PROJECT_NAME})
set(ARDUINO_DEFAULT_PORT /dev/cu.usbmodemfd121)
set(${CMAKE_PROJECT_NAME}_SKETCH ard.ino)
generate_arduino_firmware(${CMAKE_PROJECT_NAME})