This file contains hidden or 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("math") | |
local Dijkstra = { | |
nodes = {}, | |
} | |
local Node = {} | |
function Node:new(x, y) | |
local node = { |
This file contains hidden or 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
echo ".bash_profile" | |
# Harden homebrew | |
# from: https://github.com/AtropineTears/TheMacHardeningScripts/blob/main/AutoHarden_MacOSX/scripts/brew/brew-harden.sh | |
export HOMEBREW_NO_INSECURE_REDIRECT=1 | |
export HOMEBREW_FORCE_BREWED_CURL=1 | |
export HOMEBREW_AUTO_UPDATE_SECS=60 | |
export HOMEBREW_DISPLAY_INSTALL_TIMES=1 | |
export HOMEBREW_NO_ANALYTICS=1 | |
export HOMEBREW_AUTO_UPDATE_SECS=300 |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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; | |
} |