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
@Clancey
Clancey / gist:963345
Created May 9, 2011 20:39
My testflight post build script
//After build
Command : cp -r ${ProjectDir}/bin/iPhone/Release/MyAppName.app toZip/Payload
Working Directory: ${SolutionDir}
//AfterBuild
Command : zip -r ../MyApp.ipa *
WorkingDirectory: ${SolutionDir}/toZip
@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)
@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 / 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))
@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!") }
@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"
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)
@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})
@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/
@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