Skip to content

Instantly share code, notes, and snippets.

View osvein's full-sized avatar

Oskar Sveinsen osvein

View GitHub Profile
@osvein
osvein / usart.c
Last active August 29, 2015 14:25
USART with stdio and flow control for the AVR
/*
* Spor - real-time tracking using GPS and SMS
* Copyright (C) 2015 Oskar Sveinsen
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@osvein
osvein / life.lua
Created November 12, 2015 21:07
Game of Life for TI-Nspire
--[[
The MIT License (MIT)
Copyright (c) 2015 Oskar Sveinsen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@osvein
osvein / GraphicsDisplay.cpp
Last active December 27, 2015 17:00
Pong on Arduino attempt
#include "GraphicsDisplay.h"
#define DELAY 1
#define DELAY_RESET 2
GraphicsDisplay::GraphicsDisplay(int rs, int rw, int e, volatile byte *db_port, volatile byte *db_pin, volatile byte *db_ddr, int cs0, int cs1, int rst) : Rectangle(NULL, 128, 64), rs(rs), rw(rw), e(e), db_port(db_port), db_pin(db_pin), db_ddr(db_ddr), cs0(cs0), cs1(cs1), rst(rst) {
pinMode(rs, OUTPUT);
pinMode(rw, OUTPUT);
pinMode(e, OUTPUT);
*(db_ddr) = 0xFF;
# Maintainer: Oskar Sveinsen
_pkgname=ps2client
pkgname=ps2client-git
pkgver=r63.11545a3
pkgrel=1
pkgdesc="Desktop clients to interact with ps2link and ps2netfs"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
url="https://github.com/ps2dev/ps2client"
license=('BSD')
<!DOCTYPE html>
<html>
<head>
<title>MENTIMETER VIP HACKS 2016 [UNDETECTED]</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
function hack() {
var error = false;
var presentation = document.getElementById("presentation").value;
if (presentation == null || presentation == "") {
@osvein
osvein / F4SE reference.md
Created December 20, 2016 18:45
List of Papyrus functions added by the Fallout 4 Script Extender
@osvein
osvein / big product.c
Last active December 22, 2016 16:33
Finds the biggest product of two factors that can have no duplicate digits https://julekalender.knowit.no/luker/u7wLW5PdfBjAKDs4S
/* The MIT License (MIT)
*
* Copyright (c) 2016 Oskar Sveinsen
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
@osvein
osvein / sigfig.awk
Last active April 20, 2017 11:46
Counts the number of significant figures and corrects the numbers after the equals sign accordingly
#!/bin/awk -f
# sigfig.awk - counts the number of significant figures and corrects the numbers
# after the equals sign accordingly
# Copyright 2017 Oskar Sveinsen
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@osvein
osvein / f4se-mirror.sh
Last active May 13, 2017 21:35
Script to mirror F4SE archives with git
#!/bin/bash
while read p
do rm -r f4se/*
mv f4se/ "${p}/"
wget "http://f4se.silverlock.org/archive/${p}.7z"
p7zip -d "${p}.7z"
cd "${p}/"
git add -A
sed '/^$/q' f4se_whatsnew.txt | sed '1s/://' | sed '2i\\' | git commit -F -
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd]
"MUIVerb"="@shell32.dll,-8506"
"Extended"=""
"Icon"="cmd.exe"
"SubCommands"="cmd.cmd;cmd.msys2_msys;cmd.msys2_mingw32;cmd.msys2_mingw64"
[HKEY_CLASSES_ROOT\Directory\shell\cmd]
"MUIVerb"="@shell32.dll,-8506"