Skip to content

Instantly share code, notes, and snippets.

View SimenLK's full-sized avatar

Simen L. Kirkvik SimenLK

  • Serit Tromsø
  • Tromsø, Norway
View GitHub Profile

Keybase proof

I hereby claim:

  • I am simenlk on github.
  • I am simenlk (https://keybase.io/simenlk) on keybase.
  • I have a public key ASDLuihWes3CnZeE96go5DQss1pINMDp0qaL62AMZf_c0wo

To claim this, I am signing this object:

@SimenLK
SimenLK / Makefile
Created March 20, 2018 12:32
bochs makefile
# Copyright (C) 2001-2017 The Bochs Project
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
@SimenLK
SimenLK / MonokaiBright.tmTheme
Created March 15, 2018 13:35
Modified monokai bright for sublime text 3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Monokai Bright</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@SimenLK
SimenLK / flpdevdetector.pl
Created February 20, 2018 14:27
floppy detector
#!/usr/bin/env perl
# -*-perl-*-
use warnings;
use strict;
my $usbfloppy = "/dev/";
my $floppy = "/dev/fd0";
my $thingy = qx/lsblk/;
@SimenLK
SimenLK / mouseacceleration.bash
Created September 23, 2017 13:51
Remove mouse acceleration on ubuntu
#!/bin/bash
#wait for the desktop to settle
sleep 5
# turn off mouse acceleration
if [ "$SEARCH" = "SteelSeries Rival Gaming Mouse" ]; then
exit 1
fi
ids=$(xinput --list | awk -v search="$SEARCH" \
'$0 ~ search {match($0, /id=[0-9]+/);\
@SimenLK
SimenLK / server.py
Created September 17, 2017 11:21
http server run
def run(self):
print('Serving HTTP on port %s ...' %self.PORT)
while True:
client_connection, client_address = self.listen_socket.accept()
print('Connection made by {}:\n'.format(client_address))
data_list = ""
@SimenLK
SimenLK / RESTful_WebAPI_server.py
Last active September 15, 2017 12:32
Hvordan jeg får ut eksisterende json fra txt fil, og legger til ny message til json array.
def find_id(self, p_id, id_list):
id_list.sort()
if p_id == None:
p_id = 0
if id_list != []:
for l_id in id_list:
if p_id == l_id: