Skip to content

Instantly share code, notes, and snippets.

View follesoe's full-sized avatar
📱
Working on Skredvarsel app

Jonas Follesø follesoe

📱
Working on Skredvarsel app
View GitHub Profile
@ruffsl
ruffsl / Dockerfile
Last active February 28, 2024 23:49
Small ROS Network Example
FROM ros:indigo-ros-base
# install ros tutorials packages
RUN apt-get update && apt-get install -y \
ros-indigo-ros-tutorials \
ros-indigo-common-tutorials \
&& rm -rf /var/lib/apt/lists/
@martijn00
martijn00 / MainLayout.xaml
Last active March 18, 2021 14:46
Android v22.2 Tabs and ViewPager in MvvmCross
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@justingarrick
justingarrick / IIS_Parallels_Win8_Mac.md
Last active March 30, 2024 16:24
Expose IIS or IISExpress running in a Parallels Windows 7/8 VM to your OS X host

Expose IIS or IISExpress running in a Parallels Windows 7/8 VM to your OS X host

Rename your virtual machine

In your Windows 7/8 VM, go to Control Panel > System > Advanced system settings > Computer Name and click Change. Name this whatever you like, e.g. windows. Restart your VM.

Add an ACL rule

Open CMD or Powershell as administrator. Add a URL ACL entry for your new name on the port of your choice, e.g.
netsh http add urlacl url=http://windows:8080/ user=everyone

Add a firewall rule

@adamawolf
adamawolf / Apple_mobile_device_types.txt
Last active May 6, 2024 09:56
List of Apple's mobile device codes types a.k.a. machine ids (e.g. `iPhone1,1`, `Watch1,1`, etc.) and their matching product names
i386 : iPhone Simulator
x86_64 : iPhone Simulator
arm64 : iPhone Simulator
iPhone1,1 : iPhone
iPhone1,2 : iPhone 3G
iPhone2,1 : iPhone 3GS
iPhone3,1 : iPhone 4
iPhone3,2 : iPhone 4 GSM Rev A
iPhone3,3 : iPhone 4 CDMA
iPhone4,1 : iPhone 4S
@follesoe
follesoe / fizzbuzz_spec.io
Created June 26, 2012 20:13
First spike of Jasmine.Io - a simple implementation of Jasmine BDD for Io.
getFizzBuzz := method(number,
if(number % 3 == 0 and number % 5 == 0 , return "FizzBuzz")
if(number % 3 == 0, return "Fizz")
if(number % 5 == 0, return "Buzz")
number
)
describe("FizzBuzz",
it("Should return Fizz for divisible of three",
equals("Fizz", getFizzBuzz(3))
@ckirkendall
ckirkendall / clojure-match.clj
Created June 15, 2012 02:26 — forked from bkyrlach/Expression.fs
Language Compare F#, Ocaml, Scala, Clojure, Ruby and Haskell - Simple AST example
(use '[clojure.core.match :only [match]])
(defn evaluate [env [sym x y]]
(match [sym]
['Number] x
['Add] (+ (evaluate env x) (evaluate env y))
['Multiply] (* (evaluate env x) (evaluate env y))
['Variable] (env x)))
(def environment {"a" 3, "b" 4, "c" 5})
@aslakhellesoy
aslakhellesoy / gitbox.sh
Created June 1, 2012 10:14
Set up a git remote in your DropBox
#!/bin/bash
# Call this script from a local git repo to set up a dropbox remote you can push and pull to
# I keep this script under ~/Dropbox/git/gitbox.sh
# Inspired from http://stackoverflow.com/questions/1960799/using-gitdropbox-together-effectively
PWD=`pwd`
PROJECT=`basename $PWD`
pushd $HOME/Dropbox/git
git init --bare $PROJECT.git
@follesoe
follesoe / RubyXmlDslExercise.md
Created May 22, 2012 16:57
Simple Ruby XML DSL exercise implemented by Torgeir and Jonas

Simple Ruby DSL to generate XML

Implemented as an exercise to learn about metaprogramming in Ruby. The DSL is implemented using instance_eval and method_missing.

Usage

require 'xmldsl'

Twitter = Struct.new :name, :avatar, :text
twitters = []
5.times { twitters << Twitter.new("Jonas", "/profile.png", "Hello World!") }
alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split("")
base = alphabet.length
exports.encode = (i) ->
return alphabet[0] if i is 0
s = ""
while i > 0
s += alphabet[i % base]
i = parseInt(i / base, 10)
@blowdart
blowdart / EncryptionPaddingProblem.cs
Created May 18, 2011 17:20 — forked from follesoe/EncryptionPaddingProblem.cs
Padding problem with AesManaged
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
namespace CryptoTest
{
class Program
{
static void Main(string[] args)