Skip to content

Instantly share code, notes, and snippets.

View sojournercntl's full-sized avatar
🌌
at work

Marcus sojournercntl

🌌
at work
View GitHub Profile
@sojournercntl
sojournercntl / gist:36f7ac765a5d4dbe0b2d90e6dc223e8e
Created October 29, 2017 22:42 — forked from hansmaad/gist:9187633
WPF Flat Combo Box Style
<!-- Flat ComboBox -->
<SolidColorBrush x:Key="ComboBoxNormalBorderBrush" Color="#e3e9ef" />
<SolidColorBrush x:Key="ComboBoxNormalBackgroundBrush" Color="#fff" />
<SolidColorBrush x:Key="ComboBoxDisabledForegroundBrush" Color="#888" />
<SolidColorBrush x:Key="ComboBoxDisabledBackgroundBrush" Color="#eee" />
<SolidColorBrush x:Key="ComboBoxDisabledBorderBrush" Color="#888" />
<ControlTemplate TargetType="ToggleButton" x:Key="ComboBoxToggleButtonTemplate">
<Grid>
<Grid.ColumnDefinitions>
@sojournercntl
sojournercntl / DiscordRpc.cs
Created March 13, 2018 23:28 — forked from dtzxporter/DiscordRpc.cs
Discord Rpc .NET
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
//
// Discord Rpc Wrapper for .NET Framework (DTZxPorter) 12/26/2017
// Wrapper created using the open-source discord-rpc extension at:
@sojournercntl
sojournercntl / style.css
Created March 15, 2018 22:20
Flat Wallet Gist
.wallet {
position: absolute;
display: block;
width: 450px;
height: 340px;
background: #444;
border-radius: 15px;
box-shadow: 0px 0px 120px rgba(40,40,40,0.8);
top: 50%;
@sojournercntl
sojournercntl / NotificationEmail.java
Created April 23, 2018 21:00
A java class that provides a simple notificcation email function. To inform subscribed participants about events or procedures beeing finished etc.
import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
import javax.activation.*;
public class NotificationEmail{
private String from = "email@host.com";
private String to = "emailto@host.com";
@sojournercntl
sojournercntl / csrf.js
Created July 9, 2018 18:26
CSRF - Django Rest Framework Util
var jQuery = window.$;
// using jQuery
function getCookie(name) {
var cookieValue = null;
if (document.cookie && document.cookie != '') {
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = jQuery.trim(cookies[i]);
// Does this cookie string begin with the name we want?
@sojournercntl
sojournercntl / email.js
Created June 2, 2019 16:47
Node.JS Mail
var Imap = require("imap");
var MailParser = require("mailparser").MailParser;
var Promise = require("bluebird");
Promise.longStackTraces();
var imapConfig = {
user: 'USERNAME',
password: 'PASSWORD',
host: 'HOST',
port: 993,
@sojournercntl
sojournercntl / ios_cheatsheet.pdf
Last active June 4, 2019 10:51
Netzwerktechnik - Kompendium
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sojournercntl
sojournercntl / Bundesliga.sql
Created June 6, 2019 12:44
Bundesliga Schema
CREATE SCHEMA bundesliga;
USE bundesliga;
CREATE TABLE Schiedsrichter(
ZulassungsNummer INTEGER PRIMARY KEY AUTO_INCREMENT,
Vorname VARCHAR(150),
Nachname VARCHAR(150)
);
CREATE TABLE Stadions(
@sojournercntl
sojournercntl / erp.md
Created June 8, 2019 15:28
ERP - Semiramis 2018/19 Prozesse

Prozesse

  • Semiramis - 2018/19
Beschaffung
  • Beschaffungsartikel erstellen
    Artikel
@sojournercntl
sojournercntl / dns_updater.py
Created June 18, 2019 12:33
The following python script allows you to easily update the dynamic dns entry of a Namecheap domain using python and a cronjob.
import urllib2
import json
import xml.etree.ElementTree as Tree
# --------------------------------------------
from time import strftime, gmtime
host = "https://myexternalip.com/json"
# --------------------------------------------
dns_host = ""