Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Turtling

Pär Thernström bonny

🐢
Turtling
View GitHub Profile
@bonny
bonny / index.html
Created Jun 7, 2020
TextTV.nu iframe
View index.html
<p>Iframe med "vanliga" texttv.nu</p>
<iframe
src="http://texttv.nu/"
title="TextTV.nu"
width="400"
height="540">
</iframe>
View södermalm.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase.md

Keybase proof

I hereby claim:

  • I am bonny on github.
  • I am eskapism (https://keybase.io/eskapism) on keybase.
  • I have a public key ASAcBveAKwwwqxEhr3J7LhlB6sp2CiOVxdG6to9eWVgCWQo

To claim this, I am signing this object:

@bonny
bonny / simple-history-log-http-requests-time.php
Created May 6, 2016
Snippet for WordPress plugin Simple History Log that logs https request made and how long each request took
View simple-history-log-http-requests-time.php
<?php
/**
* To use this you first need to install the free plugin Simple History
* https://wordpress.org/plugins/simple-history/
*/
// pre_http_request is fired close before the actual request
add_filter( 'pre_http_request', function( $retval, $r, $url ) {
@bonny
bonny / simple-history-to-slack-incoming-webhook-integration.php
Created Feb 5, 2016
Example how to post all logged events in WordPress recent events plugin Simple History to Slack
View simple-history-to-slack-incoming-webhook-integration.php
<?php
// Prio 100 so we run late and give other filters chance to run
add_filter( "simple_history/log_insert_context", "on_log_insert_context_slackit", 100, 2 );
function on_log_insert_context_slackit( $context, $data ) {
$slack_webhook_url = '<your incoming webhook url>';
$remote_addr = empty( $context["_server_remote_addr"] ) ? "" : $context["_server_remote_addr"];
View Gistdeck test
name: inverse
layout: true
class: middle, inverse
---
## Detta är en presentation
Diggar man markdown är detta ett väldigt enkelt sätt att skapa presentationer på serru.
- Använder markdown
View ntunnel_mysql.php
<?php //version my202
//set allowTestMenu to false to disable System/Server test page
$allowTestMenu = true;
header("Content-Type: text/plain; charset=x-user-defined");
error_reporting(0);
set_time_limit(0);
function phpversion_int()
View test.js
alert(123);
document.write(456);
@bonny
bonny / test.css
Last active Aug 29, 2015
css test
View test.css
body {
background: red;
}
body:after {
content: "css changed";
position: absolute;
top: 20px;
left: 20px;
@bonny
bonny / simple-note-osx-app-restorer.php
Last active Jul 24, 2017
PHP script to list and retrieve notes from the OS X Simple Notes app. Nice to have since import/sync seems buggy in first version of the app (It deleted two months of notes for me anyway, because of a crash during import.) How to: Find the file "Simplenote.storedata.xml" that is located perhaps here or in your time machine or Arq or similar: ~/L…
View simple-note-osx-app-restorer.php
<meta charset="utf-8">
<title>SimpleNote Restorer</title>
<style>
body {
font-family: sans-serif;
background-color: #f5f5f5;
color: #111;
font-size: 14px;
}
li {
You can’t perform that action at this time.