This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//set the default æøå keys | |
#define DA_OE KC_QUOT // ø | |
#define DA_AE KC_SCLN // æ | |
#define DA_AA KC_LBRC // å | |
//default keybindings (english vs. da keys) | |
#define DA_PLUS KC_MINUS // + => - (plus key on DK is minus on EN) | |
//single quote (nordic style) | |
#define DA_QUOT KC_NONUS_HASH // ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; php-doc.el --- doc block generator/extractor for php | |
;; Copyright (C) 2010, 2013 Stefan Siegl <[email protected]> | |
;; Maintainer: Stefan Siegl <[email protected]> | |
;; Author: Stefan Siegl <[email protected]> | |
;; Keywords: php docblock | |
;; Created: 2010 | |
;; Modified: 2013-09-14 | |
;; X-URL: https://gist.github.com/stesie |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INFO interface: info: Matching MAC address for NAT networking... | |
INFO interface: info: ==> web: Matching MAC address for NAT networking... | |
==> web: Matching MAC address for NAT networking... | |
INFO interface: info: Clearing any previously set network interfaces... | |
INFO interface: info: ==> web: Clearing any previously set network interfaces... | |
==> web: Clearing any previously set network interfaces... | |
DEBUG network: Available slots for high-level adapters: #<Set: {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36}> | |
INFO network: Determining network adapters required for high-level configuration... | |
INFO network: -- Slot 2: hostonly | |
INFO network: Determining adapters and compiling network configuration... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
class eurojackpot(object): | |
def __init__(self): | |
self.s = requests.session() | |
self.url_base = 'https://danskespil.dk/scapi/danskespil/numbergames/eurojackpot/' | |
def get_dates(self): | |
url = self.url_base+"completedDrawDates" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(count($argv) < 3) { | |
die("php base64 <input filename> <output filename>\n"); | |
} | |
$input = $argv[1]; | |
$output = $argv[2]; | |
$file_content = file_get_contents($input); | |
$encoded = base64_encode($file_content); | |
return file_put_contents($output, $encoded); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import re | |
import string | |
import asyncio | |
from aiohttp import ClientSession | |
class drdk_extractor(object): | |
def __init__(self): | |
self.url = 'https://www.dr.dk/mu/programcard' | |
self.url = 'https://www.dr.dk/mu/search/programcard?Title=' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Linux SCP Backup Script | |
# how it works | |
# - | |
#date string | |
d=$(date --iso) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
username="backup" | |
password="password" | |
router_ip="https://192.168.1.1" | |
backup_location="/tmp" | |
csrf=$(wget -qO- --keep-session-cookies --save-cookies cookies.txt \ | |
--no-check-certificate $router_ip/diag_backup.php \ | |
| grep "name='__csrf_magic'" | sed 's/.*value="\(.*\)".*/\1/') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
import subprocess | |
app = Flask(__name__) | |
@app.route("/") | |
def index(): | |
return "Please visit /shutdown or /restart" | |
@app.route("/restart") | |
def restart(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
class debug_inserter(object): | |
def __init__(self, path_to_files, prefix): | |
self.path_to_files = path_to_files | |
self.debug_prefix = prefix | |
self.debug_statement = """const-string {0}, \"{1} - {2}\" | |
invoke-static {{0}, {0}}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I""" | |
self.re_filename = re.compile("\.smali$") |
OlderNewer