Skip to content

Instantly share code, notes, and snippets.

View export_example.json
{
"others_data": {
"comments": [
{
"account_id": "debora@localhost:9887",
"author_signature": "EM357P4vDF2nZMwECX3fmSAfKepNJ8T8d+LfYBpvPAkD9mgqV773TPlTXAtVLe6nBD+rEgbBQg/jI9pIGpLXpLRZC2ydjeaHpgiToaO3G++FV+SEAGlUj7OFDVG+PVsnaXcwomR9JV15r7MjWZIiOmgy+1qrPiS7OWyEZt6UbYI=",
"created_at": "2016-05-27 13:33:42 UTC",
"guid": "8d772f30063d013411be00163eb8ca07",
"post_guid": "29bc2900063d013411be00163eb8ca07",
"target_type": "Post",
@cmrd-senya
cmrd-senya / seed-migration.md
Last active Sep 30, 2016
Seed migration feature specification
View seed-migration.md
View db-dump.sql
-- MySQL dump 10.13 Distrib 5.5.47, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: diaspora_test
-- ------------------------------------------------------
-- Server version 5.5.47-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
View 200-600.diff
--- heap200.sorted 2016-03-23 22:16:13.881139271 +0300
+++ heap600.sorted 2016-03-23 22:16:40.381140354 +0300
@@ -320,6 +320,8 @@
1 /home/diaspora/diaspora/app/models/services/tumblr.rb:1:STRING
1 /home/diaspora/diaspora/app/models/services/twitter.rb:1:STRING
1 /home/diaspora/diaspora/app/models/services/wordpress.rb:2:STRING
+ 1 /home/diaspora/diaspora/app/models/share_visibility.rb:21:HASH
+ 1 /home/diaspora/diaspora/app/models/share_visibility.rb:42:STRING
1 /home/diaspora/diaspora/app/models/share_visibility.rb:7:HASH
1 /home/diaspora/diaspora/app/models/status_message.rb:13:ARRAY
View leaked.json
{
"167004000": {
"address": 167004000,
"generation": 64,
"method": "method_missing",
"file": "/usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/delegate.rb",
"memsize": 674,
"type": "REGEXP",
"references": [
167003800
View export.json
{"user":{"name":"test@localhost:9887","email":"test@test.local","language":"en","username":"test","private_key":"-----BEGIN RSA PRIVATE KEY-----\nMIIJKwIBAAKCAgEAyjd7pe0CEIlQCXJTbU85Lu1f3g+5hwEDYyyAEAMwmWq2edT1\naux7z/6FTHPoMRyMLaWw8H6xcnGj+hs+hek7yFhl/XDXYgD+oWN3qaDnw0rigGv+\nQSZhn6axIiAolpP7H+OF/Qnu9Yu28w/20gVU7b/h7aNZqrA8qc76KzLwr0dNYaCz\nERN48gZ0ifGsbDIOS2NSPdVURiYxgrRgoOOs9O3E1YNwAlGgERD6kjp/FJa1jdCr\nr5Iytgje9ibdNL4ExZwJQuYo1v6AEU0pJRCZk0rTuR6LG8mSve0L5QqKl+01yL9a\nXixAHd1vOFl9A2yDnO86oSOF3PA3HaVcOle0xcQZ4XpEWsHCYSx5XxKxndYvMqvV\nfaZhzwiVkKBfSRFjL5wmm5tWeiU5IhRsIovQ8wiDsFFk8gvYfn/zc3cD9VB/X0EC\ndEQtAJ+JdwW7l2ZUhLpqfRYdmf44XrCxB7Tyj1HGNqiDS2QLL0pkFXsXABbEn4C4\nvr9V2qmIulNmBGDfzt+/DD2S7vc4LVkACkl+TXh0+R5hYOPjTp5Ce3d8aroqfRZy\nCkECKAJTYYK6+SHa7IsVz0CbMekmdVz7KlKwViKawIPNsFf2arWb9NPNo2Bj8q1F\nwcnrLHGg638inLxSd5VRGjxR20KCUIs0Z2vpozThizZOlXbx0sKGiR+BEOECAwEA\nAQKCAgEAgpeaTunlL3C+M5uVrT5Am8HI68wT8NACtAWFHtIwjKOR/NQ/OjJHM2gY\nBevExBK/pKsgve/UASjK0TbPBgQ+C4CrPSWmszAZQXjPSskTY9f0tyMHLGPxH/2y\n32sNS1F+GHYDjgrgO8ti
View migrate.log
user@debian:~/diaspora$ bin/rake db:migrate
Running via Spring preloader in process 2954
[2016-03-04T15:17:03] DEBUG PID-2954 TID-19257700 ActiveRecord::Base: ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
[2016-03-04T15:17:03] INFO PID-2954 TID-19257700 ActiveRecord::Base: Migrating to LinkShareVisibilitiesWithUser (20160225232049)
[2016-03-04T15:17:03] DEBUG PID-2954 TID-19257700 ActiveRecord::Base: (0.2ms) BEGIN
== 20160225232049 LinkShareVisibilitiesWithUser: migrating ====================
[2016-03-04T15:17:03] DEBUG PID-2954 TID-19257700 ActiveRecord::Base: SQL (1.4ms) DELETE FROM "share_visibilities" WHERE "share_visibilities"."id" IN (SELECT "share_visibilities"."id" FROM "share_visibilities" LEFT OUTER JOIN posts ON posts.id = share_visibilities.shareable_id WHERE "share_visibilities"."shareable_type" = $1 AND (posts.id is NULL)) [["shareable_type", "Post"]]
[2016-03-04T15:17:03] DEBUG PID-2954 TID-19257700 ActiveRecord::Base: SQL (0.7ms)
View gist:23d616ab2aeb6b79cbbf
WARNING: Namespace test not found in /home/user/diaspora/config/diaspora.yml
2016-03-01T09:06:30.196Z 4527 TID-97tdc INFO: allocations tracing enabled
=> Building fixtures
=> Built contacts.yml, aspect_memberships.yml, profiles.yml, aspects.yml, people.yml, and users.yml
Run options: exclude {:performance=>true}
Randomized with seed 35881
View decrypt-archive.rb
require "openssl"
ARCHIVE_MAGIC = "D*ARCHIVE"
if ARGV[0].nil?
puts "Usage: #{__FILE__} <encrypted archive>"
exit 1
end
File.open(ARGV[0], "rb") do |f|
View prof.diff
diff --git a/Gemfile b/Gemfile
index 1f40a5e..5017eff 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,7 @@
source "https://rubygems.org"
+gem "ruby-prof"
+
gem "rails", "4.2.5"