Skip to content

Instantly share code, notes, and snippets.

View sdennler's full-sized avatar

Samuel Dennler sdennler

View GitHub Profile
@sdennler
sdennler / ChancenlosGeoCacherLottoGambler.user.js
Last active October 12, 2023 13:37
Script to win the GeoCacher Lotto for the Chancenlos GeoCaches GC3JN6W, GC3JN7G, GC3JN84 and GC3JN8J
// ==UserScript==
// @name Chancenlos GeoCacher Lotto Gambler
// @namespace https://gist.github.com/sdennler/
// @version 10
// @description Script to win the GeoCacher Lotto for the Chancenlos GeoCaches GC3JN6W, GC3JN7G, GC3JN84 and GC3JN8J
// @author Sdennler
// @match https://www.navikatzen.com/lotto_neu/*
// @exclude *winner.php*
// @grant none
// ==/UserScript==
@sdennler
sdennler / linkedinAndXingInNewWindow.js
Created September 30, 2015 12:36
Open links to sites (who set X-Frame-Options: SAMEORIGIN) in a new window if the current site is loaded in a frame.
function inFrame() {
try {
return window.self !== window.top;
} catch (e) {
return true;
}
}
window.onload = function(){
if(inFrame()){
@sdennler
sdennler / redshift.conf
Created December 1, 2015 20:37
~/.config/redshift.conf
; Global settings
[redshift]
temp-day=6500K
temp-night=4800
transition=1
gamma=0.8:0.7:0.8
;gamma=1.000:1.000:1.000
brightness=1.0:0.5
adjustment-method=randr
@sdennler
sdennler / A Sad Web App Notifier
Last active March 24, 2020 10:28
Bring the necessary Desktop Notification to Outlook Web App.
Bring the necessary Desktop Notification to Outlook Web App.
@sdennler
sdennler / A Sad GC.com Stats Extender
Last active January 9, 2019 19:28
Some improvements on the GC.com statistic page
Some improvements on the GC.com statistic page
<!DOCTYPE HTML>
<html lang="de">
<head>
<title>Test Iframe</title>
<style>
html {
height: 100%;
overflow: auto;
}
body {
@sdennler
sdennler / checkLink.php
Created July 7, 2016 09:52
Checks a CSV list of links for header like X-Frame-Options and outputs a CSV whit added header information.
@sdennler
sdennler / A lot of stuff to deal whit encodings
Last active November 17, 2016 15:23
Fixing encoding issues
Encodings are a pain. Some treats are found here:
Create-Test-File.php Creates the test file below
UTF-8-control-test.txt A test file whit all control chars
UTF-8-test.txt A great test file mad by Markus Kuhn
Filter.php Examles for filtering
Test.sh Shell comands to test for validity
@sdennler
sdennler / stream-fiter-test.php
Last active November 27, 2016 07:33
Try to do things whit PHP stream_filter
<?php
error_reporting(E_ALL);
ini_set('display_errors', 'On');
/**
* http://stackoverflow.com/questions/27103269/what-is-a-bucket-brigade
* http://stackoverflow.com/questions/38147616/consumed-bytes-for-php-user-filterfilter
*/
class append_filter extends php_user_filter {
@sdennler
sdennler / SwissHikerStats.php
Last active April 26, 2017 10:40
Ugly script to calculate the areas for the TB Swiss Hiker (TB56N6P)
<?php
/**
* Ugly script to calculate the areas for the TB Swiss Hiker and similar
* Usage:
* 1. Download KML file from GC.com (View in Google Earth)
* 1. Put in same directory as script and name it tb.kml
* 3. Get a geonames username and put bellow
* 4. Run script (php tb.php |less)
* @see https://coord.info/TB56N6P