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
local Chara = Elona.require("Chara") | |
local Event = Elona.require("Event") | |
local Iter = Elona.require("Iter") | |
local Map = Elona.require("Map") | |
local function setup() | |
local player_pos = Chara.player().position | |
for pos in Iter.rectangle_iter(player_pos.x - 1, player_pos.y - 1, | |
player_pos.x + 1, player_pos.y + 1) do | |
if not (pos.x == player_pos.x and pos.y == player_pos.y) then |
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
# usage: ruby compare.rb first.json second.json | |
# gnuplot is required. | |
# produce output.json by running: | |
# make clean | |
# make bench | |
# bin/ElonaFoobar --output json > output.json | |
require "json" | |
class Comparison |
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
;; A hack for csharp-mode to highlight string interpolation expressions like $"{foo} {bar}". Adapted from ruby-mode. | |
(c-lang-defconst c-basic-matchers-after | |
csharp `( | |
;; ... | |
,`(csharp-match-expression-expansion | |
0 font-lock-variable-name-face t) | |
)) |
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 'mechanize' | |
require 'nokogiri' | |
require 'json' | |
require 'pp' | |
class String | |
def between marker | |
self[/#{Regexp.escape(marker)}(.*?)#{Regexp.escape(marker)}/m, 1] | |
end | |
end |
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
(defcustom vstest-assembly "" "VSTest assembly to use") | |
(setq vstest-assembly "C:\\path\\to\\assembly.dll") | |
(defun vstest-console-all () | |
(interactive) | |
(let ((class-name (file-name-sans-extension (buffer-name))) | |
(default-directory (projectile-project-root)) | |
(assembly vstest-assembly)) | |
(compile (concat "vstest.console " assembly)))) |
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
#!/bin/bash | |
# | |
# rar2zip conversion script | |
# Based on: https://shkspr.mobi/blog/2016/12/converting-rar-to-zip-in-linux/ | |
# | |
# Usage: rar2zip.sh file [file ...] | |
echo "Converting RARs to ZIPs" | |
# Use RAM disk for temporary files. |
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
-- luarocks install inspect | |
local inspect = require("inspect") | |
local requests = require("requests") | |
local json = require("json") | |
local function p(...) | |
print(inspect(...)) | |
end |
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
URxvt*foreground: #DDCCBB | |
! Brown BG | |
!*background: #30251D | |
! Grey BG | |
URxvt*background: #151515 | |
!black |
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
pid /tmp/nginx/nginx.pid; | |
error_log /tmp/nginx/error.log; | |
worker_processes 1; | |
daemon off; | |
events { | |
worker_connections 1024; | |
} | |
http { |