⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
quickDrop = { | |
doBrowserWarning: function() { | |
var isChrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1; | |
var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1; | |
// Show warning box if unsupported browser | |
// Only work for Chrome atm since that what I develop in | |
// Will test Firefox when the basic functionality is in. | |
if (!isChrome) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var urlPrompt = $("<div>"); | |
urlPrompt.attr({ | |
class: 'UrlPrompt' | |
}); | |
$(".ButtonBar").append(urlPrompt); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module SplitDeclarations | |
def self.split(dec) | |
dec = dec.split(/; ?/) | |
list = {} | |
dec.each do |d| | |
pair = d.split(/: ?/) | |
list[pair[0]] = pair[1] | |
end | |
list | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#encoding: utf-8 | |
words = [ | |
"Skapande", | |
"Möte", | |
"Musik", | |
"Kontor 1", | |
"Kontor 2", | |
"Må bra", | |
"Städ", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def josephus(size, steps, survivors = 2) | |
list = *1..size | |
def list.[](i) | |
fetch(i % length) | |
end | |
puts "Population #{list.length}, #{steps} steps, #{survivors} survivors" | |
while list.length > survivors |
Brick Manmeat? Slam McRockchest? You know you want these names!
- Create the folder
mods/echo_mst3k/species
in the root of your Starbound folder. This is found inSteam/steamapps/common/starbound
. - Download
humannames.config
below. Put it inmods/echo_mst3k/species
. - Inside the folder named after the platform you're running Starbound on (
win32
for Windows), editbootstrap.config
. Addmods/echo_mst3k
to the asset list. It should look like this:
{
I hereby claim:
- I am jsvensson on github.
- I am echo (https://keybase.io/echo) on keybase.
- I have a public key whose fingerprint is 3DDF 3657 8F24 C60A 92FB 5612 6428 AFA9 4D92 7CF3
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Josephus { | |
void execute(size = 41, steps = 3, survivors = 2) { | |
def prisoners = (1..size).toArray() | |
while(prisoners.length > survivors) { | |
(steps-1).times { | |
prisoners = prisoners.tail() + prisoners.head() | |
} | |
// Execute first prisoner | |
prisoners = prisoners.tail() |