Skip to content

Instantly share code, notes, and snippets.

@bolstad
bolstad / global-protect.sh
Created December 9, 2020 14:14 — forked from kaleksandrov/global-protect.sh
Simple script that starts and stops GlobalProtect.app on Mac OSX.
#!/bin/bash
case $# in
0)
echo "Usage: $0 {start|stop}"
exit 1
;;
1)
case $1 in
start)
https://www.domstol.se/Aktenskapsforord/
https://www.domstol.se/Avgöranden/2010-12-27%20T%204728-08%20Dom,%20skiljaktighet.pdf
https://www.domstol.se/Bildbank/Grafiska%20objekt/forvaltningsratterna_091019._pdf
https://www.domstol.se/Bildbank/Grafiska%20objekt/forvaltningsratterna_091019_.pdf
https://www.domstol.se/Bildbank/Hovratt/brottmal.jpg
https://www.domstol.se/Bildbank/Hovratt/brottmal2.jpg
https://www.domstol.se/Bildbank/Logotyper/sd_color_left.gif
https://www.domstol.se/Bildbank/Pressrum/highres/Lars-Erik%20Bergström.jpg
https://www.domstol.se/Bildbank/Pressrum/highres/Nils%20Petter%20Ekdahl_02.jpg
https://www.domstol.se/Bildbank/Pressrum/highres/Stefan%20Reimer2.jpg
Copy the code below and paste it on to every page of your website.
Paste this code as high in the <head> of the page as possible:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-NKDMZKH');</script>
<!-- End Google Tag Manager -->
[{
"@context": "http://schema.org",
"@type": "LocalBusiness",
"@id": "http://www.compricer.se",
"sameAs": "https://se.trustpilot.com/review/www.compricer.se",
"image": "https://s3-eu-west-1.amazonaws.com/tpd/screenshots/4be144e5000064000507c7f2/198x149.png",
"name": "Compricer",
"priceRange": "$",
"email": "info@compricer.se",
"telephone": "08-58612270",
@bolstad
bolstad / gist:b942704e0eba6cd2679a45c3682b5c0d
Last active October 19, 2018 12:52
https://www.stadium.se/search?SearchTerm=skor - Fetched by Chrome on Desktop - noindex on line 18
<!DOCTYPE html>
<!-- PageVariantID: eR4KRMHGf1YAAAFaatcdWKNn -->
<html>
<!-- refreshed Fri Oct 19 14:49:08 CEST 2018 -->
<head>
<link href="/INTERSHOP/static/WFS/Stadium-SwedenB2C-Site/-/-/sv_SE/css/compressed/combined.compressed.css?lastModified=1539769820000" rel="preload" as="style" /><link href="/INTERSHOP/static/WFS/Stadium-SwedenB2C-Site/-/-/sv_SE/css/compressed/combined.compressed2.css?lastModified=1539769821000" rel="preload" as="style" /><link href="/INTERSHOP/static/WFS/Stadium-SwedenB2C-Site/-/-/sv_SE/css/compressed/combined.compressed3.css?lastModified=1539769821000" rel="preload" as="style" /><link href="/INTERSHOP/static/WFS/Stadium-SwedenB2C-Site/-/-/sv_SE/css/compressed/combined.compressed4.css?lastModified=1539769821000" rel="preload" as="style" />
<link rel="preload" href="/INTERSHOP/static/WFS/Stadium-SwedenB2C-Site/-/-/sv_SE/fonts/StadiumSans-Numbers.woff" as="font" crossorigin="anonymous">
<link rel="preload" href="/INTERSHOP/static/WFS/Stadium-SwedenB2C-Site/-/-/sv_SE/fonts/StadiumSansW0
@bolstad
bolstad / gist:7578888
Created November 21, 2013 09:53
strict error reporting for PHP
error_reporting( E_ALL );
ini_set( 'display_errors', 'On' );
ini_set( 'display_startup_errors', 'On' );
// error report routine based on code by pekka @ stackowerflow http://stackoverflow.com/a/3193084
error_reporting( -1 );
function terminate_missing_variables( $errno, $errstr, $errfile, $errline ) {
if ( ( $errno == E_NOTICE ) and ( strstr( $errstr, "Undefined variable" ) || strstr( $errstr, "Undefined property" ) || strstr( $errstr, "Undefined index" ) ) )
die ( "\nFATAL: $errstr in $errfile line $errline \n" );
@bolstad
bolstad / gist:7361747
Created November 7, 2013 20:57
redis benchmark on raspberry pi
christian@raspbx:~$ redis-benchmark -q -n 100000
PING_INLINE: 2937.46 requests per second
PING_BULK: 2794.08 requests per second
SET: 2584.38 requests per second
GET: 2654.63 requests per second
INCR: 2532.42 requests per second
LPUSH: 2598.96 requests per second
LPOP: 2597.88 requests per second
SADD: 2635.74 requests per second
SPOP: 2800.02 requests per second
@bolstad
bolstad / 0_reuse_code.js
Created September 28, 2013 06:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
[Dialer Defaults]
Init1 = ATH
Init2 = ATE1
Init3 = AT+CGDCONT=1,"IP","online.telia.se","",0,0
Dial Command = ATD
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0
kers@blingamatic:~/scripts/sigtuna_cache_invalidate/AWS-CloudFront-Invalidator-master$ php invalidate.php E219B1SVKAUH77 /ds-eventcalendar-external
Making invalidation request...
Request completed successfully:
ID: I14HNEDA0HUK6P
Time: 2013-07-08T08:08:23.407Z
Status: InProgress
Getting status of the last invalidation requests...
I14HNEDA0HUK6P: InProgress
I2B7Z4QBGM9389: Completed