Skip to content

Instantly share code, notes, and snippets.

View bonny's full-sized avatar
🇺🇦
StandWithUkraine

Pär Thernström bonny

🇺🇦
StandWithUkraine
View GitHub Profile
@bonny
bonny / watson-xbar-plugin.sh
Last active January 20, 2022 16:57
xbar script for watson
#!/usr/bin/env bash
# Watson Brew Status
#
# by Antoine Corcy <contact@sbin.dk>
# updated by Pär Thernstrom <par.thernstrom@gmail.com>
# to support Watson custom location and configuration.
#
# <xbar.title>Watson Brew Status</xbar.title>
# <xbar.version>1.0</xbar.version>
@bonny
bonny / index.html
Created June 7, 2020 19:57
TextTV.nu iframe
<p>Iframe med "vanliga" texttv.nu</p>
<iframe
src="http://texttv.nu/"
title="TextTV.nu"
width="400"
height="540">
</iframe>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

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 15:29
Snippet for WordPress plugin Simple History Log that logs https request made and how long each request took
<?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 February 5, 2016 12:40
Example how to post all logged events in WordPress recent events plugin Simple History to Slack
<?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"];
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
<?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()
@bonny
bonny / test.js
Created June 2, 2014 07:35
script test
alert(123);
document.write(456);
@bonny
bonny / test.css
Last active August 29, 2015 14:02
css test
body {
background: red;
}
body:after {
content: "css changed";
position: absolute;
top: 20px;
left: 20px;