Jonne Haß MrZYX

View populations.json
1 2 3 4 5 6 7 8 9 10
{
"Antigua and Barbuda" : 90604,
"United Kingdom" : 63375707,
"China" : 1391193266,
"St. Lucia" : 183292,
"Netherlands" : 16790052,
"Tuvalu" : 9888,
"Iraq" : 34419098,
"Cambodia" : 15312752,
"Canada" : 35417147,
View diaspora_spam.rb
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby
 
# List of spam accounts
spam_accounts = %w(spamacc@podA spamacc@podB spamacc@mypod)
 
# Delete comments even if spammer isn't a local user or spam isn't on a
# local users account
always_delete = true
 
# Keep empty (%w() or []) to retract spam comments from remote accounts
View scan_pods_for_ssl.rb
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby
# Run from Diaspora root
# Requires https://github.com/DinoTools/sslscan/ (this fork) (https://aur.archlinux.org/packages/sslscan-git/)
 
class Scanner
def initialize host, statistics
@host = host
@statistics = statistics
run
end
View Gemfile
1 2 3 4 5 6 7 8 9 10
source "https://rubygems.org"
 
ruby "2.0.0"
 
gem 'rack'
gem 'puma'
 
group :development do
gem 'foreman'
end
View dump_socket.sh
1 2 3 4 5 6 7 8 9
#!/bin/bash
 
# Parameters
socket="/run/foo.sock"
dump="/tmp/capture.pcap"
 
# Extract repetition
port=9876
source_socket="$(dirname "${socket}")/$(basename "${socket}").orig"
View sidekiq.rake
1 2 3 4 5 6 7 8 9 10
namespace :sidekiq do
def print_stats
stats = Sidekiq::Stats.new
[:processed, :failed, :enqueued, :scheduled_size, :retry_size].each do |stat|
puts "sidekiq.#{stat} #{stats.send(stat)}"
end
puts "sidekiq.busy #{Sidekiq.redis { |con| con.scard("workers") }}"
end
 
desc "Print current sidekiq statistics"
View me@mrzyx.de.asc.txt
1 2 3 4 5 6 7 8 9 10
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2.0.22 (GNU/Linux)
 
mQENBE7I+ZUBCAC1zez5X2Y4zFbslYAobm4VX3jxV9gfAmN8rF6CM4cvGzcuy4+a
woRDXXu016QH3v/pnSSn9neWGNm4HULNiAl3gxIjhBvZcyiVV5eiDQaxLENZrjYb
BW0YtseVwWBmwD3mEyA7eRz81rzgldvUbQmh9DEEl0ZJf8tsQWGrQQB7g10bdRVp
X2P/KSYsoodDEiF+XDfSPKrzAZoqxa/mSZFCQeyThsvSyTa8baSvDA5iHm/p4MPn
Pa0Aki6QYLgYkGo5wFbrPENV7wToMiNOzg21mYdKouaijAC592CqWi1XSQE8nIEq
NppX+uI2jazH3EqFNviuyFKyw9fGYInHYHWrABEBAAG0GEpvbm5lIEhhw58gPG1l
QG1yenl4LmRlPohGBBARAgAGBQJQ42hSAAoJEOpqsNjng4LhbX8An1qLlq1b/5uA
View offline_pods.rb
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby
ENV['RAILS_ENV'] ||= "production"
 
require 'rubygems'
require 'ansi_colors'
require './config/environment'
 
#user = User.find_by_username("mrzyx")
#handles = user.contacts.collect { |c| c.person.diaspora_handle }
handles = Person.all.collect { |person| person.diaspora_handle }
View pastebin.bash
1 2 3 4 5 6 7 8 9 10
function pastebin() {
if [ -n "$1" ]; then
lang="$1"
else
lang="plain"
fi
curl -s -d "paste_user=$USER" -d "mode=xml" -d "api_submit=true" \
-d "paste_lang=$lang" --data-urlencode "paste_data@-" http://paste.mrzyx.de | \
xml sel -t -v "//id" | \
View reshare_path_length.rb
1 2 3 4 5 6 7 8 9 10
#!/usr/bin/env ruby
require './config/environment'
 
def path_length(post, length=0)
if post.is_a?(Reshare)
path_length(post.root, length+1)
else
length
end
end
Something went wrong with that request. Please try again.