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
/* | |
Copyright 2012-2023 Jun Wako <wakojun@gmail.com> Kyrremann <kyrremann@gmail.com> | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 2 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of | |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
GNU General Public License for more details. |
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
require 'httparty' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'cgi' | |
require 'json' | |
cities = ['Alta', 'Arendal', 'Askim_(tettsted)', 'Bergen', 'Bodø', 'Brekstad', 'Brevik', 'Brumunddal', 'Bryne', 'Brønnøysund', 'Drammen', 'Drøbak', 'Egersund', 'Elverum', 'Fagernes', 'Farsund', 'Fauske', 'Finnsnes', 'Flekkefjord', 'Florø', 'Fosnavåg', 'Fredrikstad', 'Førde', 'Gjøvik', 'Grimstad', 'Halden', 'Hamar', 'Hammerfest', 'Harstad', 'Haugesund', 'Hokksund', 'Holmestrand', 'Honningsvåg', 'Horten', 'Hønefoss', 'Jessheim', 'Jørpeland', 'Kirkenes', 'Kolvereid', 'Kongsberg', 'Kongsvinger', 'Kopervik', 'Kragerø', 'Kristiansand', 'Kristiansund', 'Langesund', 'Larvik', 'Leknes', 'Levanger', 'Lillehammer', 'Lillesand', 'Lillestrøm', 'Lyngdal', 'Mandal', 'Mo_i_Rana', 'Moelv', 'Molde', 'Mosjøen', 'Moss', 'Mysen', 'Måløy', 'Namsos', 'Narvik', 'Notodden', 'Odda', 'Orkanger', 'Oslo', 'Otta', 'Porsgrunn', 'Raufoss', 'Risør', 'Rjukan', 'Røros', 'Sandefjord', 'Sandnes', 'Sandnessjøen', 'Sandvika', 'Sarpsborg', 'Sauda', 'Ski_(tettsted |
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
from PIL import Image | |
def convertBitmap(filename): | |
result = [] | |
bitmap = Image.open(filename) | |
width = bitmap.width | |
height = bitmap.height | |
for y in range(0, height, 8): | |
for x in range(0, width): | |
col = 0 |
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
{ | |
"language": "Norsk", | |
"startmenu.new_game": "NYTT SPILL", | |
"startmenu.multiplayer": "FLERSPILLER", | |
"startmenu.resume_game": "FORTSETT", | |
"startmenu.settings": "Innstillinger", | |
"startmenu.high_score": "Poengtavle", | |
"startmenu.throne_room": "Tronsal", | |
"startmenu.about": "Om", | |
"news.title": "Nyheter", |
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
-- SICK: Simple Indicative of Competitive sKill | |
-- aka libhighscore | |
local h = {} | |
h.scores = {} | |
function h.set(filename, places, name, score) | |
h.filename = filename | |
h.places = places | |
if not h.load() then | |
h.scores = {} |
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
# Ruby is our language as asciidoctor is a ruby gem. | |
lang: ruby | |
before_install: | |
- sudo apt-get install pandoc | |
- gem install asciidoctor | |
script: | |
- make | |
after_success: | |
- .travis/push.sh | |
env: |
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
int TILE_SIZE = 64; | |
boolean DEBUG = false; | |
PImage tileImages[]; | |
int tileIndex = 1; | |
int map[][]; | |
PImage backgroundImage; | |
void setup() { |
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
/* -*- mode: java; compile-command: "javac -classpath /usr/share/java/robocode.jar EightBot.java; robocode -battle /home/simen/.robocode/battles/eightbot-vs-crazy.battle" -*- */ | |
import robocode.*; | |
import java.util.*; | |
import java.awt.Color; | |
import static java.lang.Math.*; | |
public class EightBot extends AdvancedRobot { | |
final int TOLLERANCE = 10; |
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
# copyfile | |
copyfile() { | |
local files=""; | |
local path="$PWD"; | |
for var in $@; | |
do | |
files="${files} ${path}/${var}"; | |
done; | |
echo ${files} | xclip; | |
} |