Skip to content

Instantly share code, notes, and snippets.

View thuma's full-sized avatar

Martin Harari Thuresson thuma

View GitHub Profile
[connection]
id=Glesys
uuid=ae23991c-77cf-445c-a189-6a89f89698ff
type=vpn
autoconnect=false
interface-name=--
permissions=
[vpn]
gateway=pptp.glesys.com
import subprocess
import configparser
config = configparser.ConfigParser()
config.read('/etc/asterisk/sip.conf')
sipusers = config.sections()
sipusers = sipusers[2:]
def execute(cmd):
popen = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True)
### PHP file: departures.php
<?php
// Print heder:
header('Content-Type: application/json; charset=utf-8');
if(intval(date("H")) > 21 OR intval(date("H")) < 6)
{
die('{"error":"night"}');
}
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace elktest {
class Program {
public static string user = "<API Username>";
### Keybase proof
I hereby claim:
* I am thuma on github.
* I am thuma (https://keybase.io/thuma) on keybase.
* I have a public key whose fingerprint is B6BB C2A6 A838 DFD3 587D 1F83 77F5 7978 1B04 0FC8
To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am thuma on github.
  • I am thuma (https://keybase.io/thuma) on keybase.
  • I have a public key whose fingerprint is CE3A 7EDA 7AD7 4ED1 4DC1 5835 39C8 2210 3365 3B40

To claim this, I am signing this object: