Skip to content

Instantly share code, notes, and snippets.

Avatar

Fredrik Leijon FredrikL

View GitHub Profile
View gist:466563
[Punisher, Tournament v3]
Centii C-Type Adaptive Nano Plating
Imperial Navy Energized Adaptive Nano Membrane
Gyrostabilizer II
400mm Reinforced Rolled Tungsten Plates I
1MN Afterburner II
Stasis Webifier II
200mm AutoCannon II, Republic Fleet EMP S
View Ninja
[Pilgrim, ninja ratter]
Medium Armor Repairer II
Damage Control II
Armor EM Hardener II
Armor Thermic Hardener II
Heat Sink II
10MN Afterburner II
Cap Recharger II
Cap Recharger II
View gist:1038709
using System;
using Microsoft.Scripting.Hosting;
using IronRuby;
namespace IronRubyHostTest
{
public class Meh
{
public void baz()
{
View twitter_oauth_setup.rb
#!/usr/bin/env ruby
# Command line util for acquiring a one-off Twitter OAuth access token
# Based on http://blog.beefyapps.com/2010/01/simple-ruby-oauth-with-twitter/
require 'rubygems'
require 'oauth'
puts <<EOS
Set up your application at https://twitter.com/apps/ (as a 'Client' app),
View Wheels.cs
public class Wheels : IWheels
{
private readonly OutputPort motorOneDirection;
private readonly OutputPort motorTwoDirection;
private readonly PWM motorOneSpeed;
private readonly PWM motorTwoSpeed;
public Wheels(Cpu.Pin motorOneDirectionPin, Cpu.Pin motorOneSpeedPin,
Cpu.Pin motorTwoDirectionPin, Cpu.Pin motorTwoSpeedPin)
View ball.ino
#include "LPD8806.h"
#include "SPI.h"
// code revision for my version of http://www.youtube.com/watch?v=IUhEINPraN8&feature=youtu.be
int aX = 0;
int aY = 1;
int aZ = 3;
int stripDataPin = 2;
View foo.cs
using System.Linq;
namespace Baz
{
public class Foo
{
public byte[] Bar()
{
byte[] b = new byte[] {};
@FredrikL
FredrikL / make_token.rb
Created May 8, 2012 — forked from mirakui/make_token.rb
To get twitter/oauth access token
View make_token.rb
require 'twitter_oauth'
print 'Consumer Key> '
consumer_key = gets.chomp
print 'Consumer Secret> '
consumer_secret = gets.chomp
t = TwitterOAuth::Client.new(
:consumer_key => consumer_key,
@FredrikL
FredrikL / buildall.ps1
Created Jun 21, 2012
Build everything
View buildall.ps1
foreach($sln in (Get-ChildItem . -recurse -include *.sln))
{
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild /m $sln
if ($LastExitCode -ne 0) { throw 'Build error' }
}
foreach($TestFile in (Get-ChildItem . -recurse -include *Test.csproj)) {
C:\Tools\NUnit-2.6.1\bin\nunit-console.exe /nologo /noshadow $TestFile
}
View rails.sh
#! /bin/sh
### BEGIN INIT INFO
# Provides: rails
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start a Rails instance
# Description: Do the simplest thing possible in keeping with
# upstart to spin up a single Rails instance.
You can’t perform that action at this time.