Skip to content

Instantly share code, notes, and snippets.

Victor Häggqvist victorhaggqvist

Block or report user

Report or block victorhaggqvist

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@victorhaggqvist
victorhaggqvist / raven-dummy.js
Created Apr 17, 2017
Raven dummy fallback impl
View raven-dummy.js
var Raven = Raven || {config: function(){return {install:function(){}};}};
Raven.config('dddd').install();
View goregtest.js
"use strict";
(function() {
Error.stackTraceLimit = Infinity;
var $global, $module;
if (typeof window !== "undefined") { /* web page */
$global = window;
} else if (typeof self !== "undefined") { /* web worker */
$global = self;
View grafana-dashboard-exporter.sh
#!/bin/bash
KEY=XXXXXXXXXXXX
HOST="https://metrics.crisidev.org"
DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
mkdir -p dashboards
for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\= | jq '.[]| .uri'); do
outfile=$(echo $dash | sed 's/\//-/g' | sed 's/"//g')
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/$(echo $dash | sed 's/"//g') > ~/dashboards/$outfile-$DATE.json
done
View solarized-colordemo.html
<style>
/*
$base03: #002b36;
$base02: #073642;
$base01: #586e75;
$base00: #657b83;
$base0: #839496;
$base1: #93a1a1;
$base2: #eee8d5;
$base3: #fdf6e3;
View gist:483802813faac5b21482
https://s3.amazonaws.com/assets.getpebble.com/sdk3/release/sdk-core-3.8.1.tar.bz2
View PKGBUILD
# Maintainer: Arnaud Taffanel <dev@taffanel.org>
# Contributor: Victor Häggqvist <victor@snilius.com>
pkgname=solaar
pkgver=0.9.2
pkgrel=2
pkgdesc="Device manager for Logitech's Unifying receiver peripherals"
url="http://pwr.github.com/Solaar/"
license=('GPL2')
groups=()
@victorhaggqvist
victorhaggqvist / pebble-sdk-beta.PKGBUILD
Created Apr 8, 2015
Pebble SDK 3.0_dp6 PKGBUILD and PKGBUILD for qemu-fdt
View pebble-sdk-beta.PKGBUILD
# Maintainer: Florian Bruhin (The Compiler) <archlinux.org@the-compiler.org>
# Adapted for dp1 version by Semyon Maryasin <simeon@maryasin.name>
# vim: ft=sh
pkgname=pebble-sdk-beta
pkgver=3.0_dp6
pkgrel=1
pkgdesc="Pebble SDK, used to develop applications and watchfaces for the Pebble Smartwatch."
url="https://developer.getpebble.com/2/getting-started/"
arch=('i386' 'x86_64')
View archlinux-install.sh
# confirm you can access the internet
if [[ ! $(curl -Is http://www.google.com/ | head -n 1) =~ "320 Found" ]]; then
echo "Your Internet seems broken. Press Ctrl-C to abort or enter to continue."
read
fi
# make 2 partitions on the disk.
parted -s /dev/sda mktable msdos
parted -s /dev/sda mkpart primary 0% 100m
parted -s /dev/sda mkpart primary 100m 100%
@victorhaggqvist
victorhaggqvist / wlp3s0-eduroam
Created Mar 30, 2015
netctl-eduroam-kth arch linux
View wlp3s0-eduroam
Connection='wireless'
Interface=wlp3s0
Security='wpa-configsection'
Description="eduroam network"
IP='dhcp'
TimeoutWPA=30
WPAConfigSection=(
'ssid="eduroam"'
'key_mgmt=WPA-EAP'
'eap=PEAP'
@victorhaggqvist
victorhaggqvist / wakelock.service
Last active Mar 30, 2019
Lock screen after suspend with i3lock and systemd
View wakelock.service
# file /etc/systemd/system/wakelock.service
[Unit]
Description=Lock the screen on resume from suspend
[Service]
User=victor
Type=forking
Environment=DISPLAY=:0
ExecStart=/usr/bin/i3lock
You can’t perform that action at this time.