Skip to content

Instantly share code, notes, and snippets.

View Voker57's full-sized avatar

Voker57 Voker57

View GitHub Profile
error[E0308]: mismatched types
--> src/universe.rs:69:32
|
69 | #[derive(PartialEq, Serialize, Deserialize)]
| ^^^^^^^^^^^ expected struct `universe::Empire`, found struct `universe::_IMPL_DESERIALIZE_FOR_Empire::<impl universe::_IMPL_DESERIALIZE_FOR_UniverseLocation::_serde::Deserialize<'de> for universe::Empire>::deserialize::__Visitor`
|
= note: expected type `storage::ID<universe::Empire>`
found type `storage::ID<universe::_IMPL_DESERIALIZE_FOR_Empire::<impl universe::_IMPL_DESERIALIZE_FOR_UniverseLocation::_serde::Deserialize<'de> for universe::Empire>::deserialize::__Visitor<'_>>
@Voker57
Voker57 / gist:48e7303124532f3d30884183cdf46c59
Created December 14, 2018 19:16
attempted mod patching
<Operation Class="PatchOperationFindMod">
<success>Always</success> <mods>
<li>Miscellaneous_Robots</li>
</mods>
<match Class="PatchOperationAdd">
<xpath>Defs/Verse.ThingDef[@Name = "HaulerBot"]/comps</xpath>
<value>
<li><compClass>PickUpAndHaul.CompHauledToInventory</compClass></li>
</value>
</match>
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
def int_to_pstoid(int)
int = int.to_i
result = ""
while int > 0
result.prepend(((int % 27) + 'a'.ord - 1).chr)
int = int / 27
end
result
end
il2017-02-26 23:22:41.712629 [debug] AI : Logger.cpp:67 : Logger initialized
2017-02-26 23:22:41.712767 [info] AI : Logger.cpp:68 : v0.4.6+ [build 2017-02-26.d259e41] CMake
2017-02-26 23:22:41.712792 [debug] AI : AIClientApp.cpp:87 : AI_1 ai client initialized.
2017-02-26 23:22:41.712813 [debug] AI : AIClientApp.cpp:162 : Attempting to contact server
2017-02-26 23:22:41.712824 [debug] AI : ClientNetworking.cpp:166 : ClientNetworking::ConnectToServer : attempting to connect to server at 127.0.0.1
2017-02-26 23:22:41.712864 [debug] AI : ClientNetworking.cpp:178 : tcp::resolver::iterator host_name: 127.0.0.1 address: 127.0.0.1 port: 12346
2017-02-26 23:22:41.712958 [debug] AI : ClientNetworking.cpp:196 : ClientNetworking::ConnectToServer : connected to server
2017-02-26 23:22:41.712978 [debug] AI : ClientNetworking.cpp:200 : ClientNetworking::ConnectToServer : this client using xml serialization.
2017-02-26 23:22:41.712992 [debug] AI : ClientNetworking.cpp:203 : ClientNetworking::ConnectToServer : starting net
@Voker57
Voker57 / mfp.rb
Created February 17, 2017 23:30
mfp.rb
require 'nokogiri'
require 'open-uri'
mainpage = Nokogiri.parse(open("http://musicforprogramming.net/"))
mainpage.search("div#episodes/a").each do |a|
a_pg = Nokogiri.parse(open("http://musicforprogramming.net/" + a["href"]))
puts a_pg.at("audio")["src"]
end
#!/bin/sh
VERSION=$1
if [ -f /opt/freeorion/$VERSION ] ; then
echo "Already installed."
exit 0
fi
if [ -f ~/Sources/freeorion/$VERSION.tar.gz ] ; then
echo "Unpacking..."
sudo rm -rf /opt/freeorion
cd /
#!/bin/sh
# dump.bitcheese.net backup script
# stores current dump backup id in BACKUP_ID_FILE because ipfs dos not allow ipns pinning yet
BACKUP_ID_FILE=$HOME/.dump-backup-is
BACKUP_ID=""
if [ -f "$BACKUP_ID_FILE" ]
# usage: ruby bnwdump.rb put <loginkey> < file
# ruby bnwdump.rb get <loginkey> <id> > file
require 'net/http'
require 'base64'
require 'json'
club = "files"
action = ARGV[0]
main = do
let f = do
print 1
f