Skip to content

Instantly share code, notes, and snippets.

View murphyslaw's full-sized avatar
🎯
Focusing

Falk Köppe murphyslaw

🎯
Focusing
View GitHub Profile
@murphyslaw
murphyslaw / frontier_phobos_extraction.but
Created June 27, 2025 21:53
Windows executable to run the Phobos project against the EVE Frontier game client.
@echo off
set evepath="C:\Program Files\EVE Frontier"
set dest=C:\Users\johndoe\Downloads
set outfile=%dest%\frontier.zip
set dirs=fsd_lite fsd_binary resource_pickle
:: extract data
python run.py --eve=%evepath% --json=%dest% --list="types, typelist, blueprints, iconids" --translate=en-us
@murphyslaw
murphyslaw / move-git-tag.sh
Created June 26, 2025 14:51
Command to move a git tag after rebase
(export VERSION="1.2.3"; git push origin ":$VERSION"; git tag --delete "$VERSION"; git tag "$VERSION"; git push origin "$VERSION")
@murphyslaw
murphyslaw / frontier_icon_extractor.py
Created June 26, 2025 07:05
EVE Frontier Icon Extractor (Windows)
"""
EVE Frontier icon extractor.
This script copies all icon image files from the EVE Frontier (Windows) game
client to a given output directory. Only icons for types that are either inputs
or outputs of a blueprint are considered. The possible blueprints are determined
by a list of EVE Frontier structure ids.
The script is based on the output of the Phobos project JSON files. See
https://github.com/pyfa-org/Phobos for more details and instructions.
@murphyslaw
murphyslaw / shell-variables.sh
Created May 20, 2024 11:26
Sorted list of unique shell variables used in a file
grep -o '${[^}]*}' FILE | sort | uniq
@murphyslaw
murphyslaw / README.md
Created May 18, 2024 18:33
[Bitbucket Pipeline] Handle a repository-dependent dynamic step environment variable with default value from package.json version

PROBLEM

When, for example, you are sharing a step between a custom and a branch pipeline which requires a variable to be set, then you can set this variable in the custom pipeline with a custom manual pipeline variable , but this leaves the variable unset in the branch pipelines.

SOLUTION

If the VERSION variable is a static value in the branch pipelines, you can set it in the workspace , deployment or repository variables configuration. But if it is a dynamic value, based on your repository content, then shell parameter expansion [↑](https://www.gnu.org/software/bash/m

@murphyslaw
murphyslaw / ubuntu-install-ruby-1.8.7.sh
Last active November 26, 2024 14:12
Install Ruby 1.8.7 with rbenv on Ubuntu
# Install system libraries.
sudo apt-get install zlib1g-dev openssl libssl-dev libreadline-dev git-core
# Install rbenv.
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
# Setup bash.
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
@murphyslaw
murphyslaw / array_transformer.rb
Created June 3, 2011 19:18
A ruby script that transforms an array from a csv file into an array with the same structure but with transformed column names and values. You can optionally define transformations on each column.
#!/usr/bin/ruby -w
require 'active_support/core_ext'
# The transformer class uses a source array and a mapping table to
# create a target array, with the same structure as the source array
# but transformed values. The structure of the source array is oriented
# on what is returned after parsing a csv file.
#
# Optionally, it is also possible to define transformation methods for each column, which
@murphyslaw
murphyslaw / CSV Duplication Remover
Created May 28, 2011 07:49
A ruby script that removes duplicate rows in a csv file. Duplicates are found based on an identifier column and a criteria column, which are configurable.
#!/usr/bin/ruby -w
require 'csv'
require 'active_support/core_ext'
class Parser
attr_accessor :input_folder
attr_accessor :output_folder
attr_accessor :filename