Skip to content

Instantly share code, notes, and snippets.

Dimitar Haralanov dalizard

Block or report user

Report or block dalizard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View frequency_tests.erl
-module(frequency_tests).
-include_lib("eunit/include/eunit.hrl").
-define(setup(F), {setup, fun start/0, fun stop/1, F}).
%%%
%%% TESTS DESCRIPTIONS
%%%
boot_up_test_() ->
{"Can be started with a registered name",
View frequency.erl
%% Based on code from
%% Erlang Programming
%% Francecso Cesarini and Simon Thompson
%% O'Reilly, 2008
%% http://oreilly.com/catalog/9780596518189/
%% http://www.erlangprogramming.org/
%% (c) Francesco Cesarini and Simon Thompson
-module(frequency).
-export([init/0]).
@dalizard
dalizard / rules for good testing.md
Created Nov 18, 2016 — forked from Integralist/rules for good testing.md
Sandi Metz advice for writing tests
View rules for good testing.md

Rules for good testing

Look at the following image...

...it shows an object being tested.

You can't see inside the object. All you can do is send it messages. This is an important point to make because we should be "testing the interface, and NOT the implementation" - doing so will allow us to change the implementation without causing our tests to break.

View mutt-sidebar.patch
diff -urN mutt-1.6.1/buffy.c mutt-1.6.1-sidebar/buffy.c
--- mutt-1.6.1/buffy.c 2016-05-02 03:02:12.397171385 +0100
+++ mutt-1.6.1-sidebar/buffy.c 2016-05-02 03:02:15.009212943 +0100
@@ -27,6 +27,10 @@
#include "mutt_curses.h"
+#ifdef USE_SIDEBAR
+#include "sidebar.h"
+#endif
View gist:c689ca883298cec0017759de3494667f
[1] pry(main)> module A
[1] pry(main)* module B; end
[1] pry(main)* end
=> nil
[2] pry(main)> A::B.class_eval { Module.nesting }
=> []
[3] pry(main)> A::B.class_eval('Module.nesting')
=> [A::B]
[4] pry(main)>
View gist:73978e10511815cea876
1/9/15 4:33:40.420 PM 2BUA8C4S2C.com.agilebits.onepassword-osx-helper[444]: This application is modifying the autolayout engine from a background thread, which can lead to engine corruption and weird crashes. This will cause an exception in a future release.
Stack:(
0 CoreFoundation 0x00007fff93ba464c __exceptionPreprocess + 172
1 libobjc.A.dylib 0x00007fff92ba66de objc_exception_throw + 43
2 CoreFoundation 0x00007fff93ba44fd +[NSException raise:format:] + 205
3 Foundation 0x00007fff8cd00be0 _AssertAutolayoutOnMainThreadOnly + 83
4 Foundation 0x00007fff8cadf432 -[NSISEngine withBehaviors:performModifications:] + 31
5 AppKit 0x00007fff8fd007ea -[NSView(NSConstraintBasedLayout) _withAutomaticEngineOptimizationDisabled:] + 70
6 AppKit 0x00007fff8fd88138 __52-[NSView(NSConstraintBasedLayout) _setLayoutEngine:]_block_invoke
View gist:7721f0710a9c0b413b55
Everything below was the setup while I was on Namecheap. I registered an account with DNSSimple, and I don't have any problems there.
=============================================================================================================================
I am using 3 domains with you - forebits.com, teodosita.com, and teodesita.com. For the last 2, things do not work as expected. They are using your DNS servers. Both of the last 2 domains only have CNAME records, which are used for Heroku hosted stuff. It's been more than a few days since the update. Currently I get the following:
~ $ dig -t ns teodesita.com
; <<>> DiG 9.8.3-P1 <<>> -t ns teodesita.com
;; global options: +cmd
View gist:6221397
Destination Gateway Flags Refs Use Netif Expire
default 10.205.1.1 UGSc 17 43 en0
10.205.1/24 link#4 UCS 4 0 en0
10.205.1.1 bc:16:65:93:6a:93 UHLWIir 18 112 en0 1190
10.205.1.13 127.0.0.1 UHS 0 0 lo0
10.205.1.18 c8:a:a9:4a:62:80 UHLWIi 0 45 en0 1164
10.205.1.21 1c:75:8:c3:20:ab UHLWIi 3 2132 en0 1168
10.205.1.23 74:e5:b:d:e4:20 UHLWIi 0 0 en0 1109
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 2 10146422 lo0
View gist:6164143
Top 50 slowest examples (299.23 seconds, 12.7% of total time):
SearchResult.strip_user_from_search_results removes users from search results, who have been banned by the user
8.73 seconds ./spec/models/search/search_result_spec.rb:55
Omniture tracking (set stat_secret.var_name variables) Profile visited Should set "prop17" to visited profile info (age1|[age2]#gender1|[gender2]#pic?#FFT|SFT)
and "prop5" to pageName_visitedProfileInfo
when visiting own profile (page my_profile_common_show)
8.56 seconds ./spec/features/omniture_tracker_spec.rb:444
SearchResult.strip_user_from_search_results does nothing when there are no banned relations
8.13 seconds ./spec/models/search/search_result_spec.rb:67
SearchResult.strip_user_from_search_results removes users from search results, who have banned the user
View gist:6007987
rspec ./spec/features/gallery_spec.rb:61 # Gallery check with photos should render gallery HTML in my profile, which has the right behaviour
rspec ./spec/features/gallery_spec.rb:86 # Gallery check with photos should load the first picture from the gallery as a profile picture
rspec ./spec/features/gallery_spec.rb:91 # Gallery check with photos should change the profile picture if you click on a picture from the gallery
rspec ./spec/features/gallery_spec.rb:97 # Gallery check with photos should see how photos look shared or not shared
rspec ./spec/features/gallery_spec.rb:122 # Gallery check without photos should not render gallery HTML in my profile
rspec ./spec/features/login_spec.rb:7 # Login Should log in a credits user
rspec ./spec/features/login_spec.rb:17 # Login Should log in a premium user
rspec ./spec/features/omniture_tracker_spec.rb:37 # Omniture tracking (set stat_secret.var_name variables) In all pages Should left "channel", "pageType", "state" and "zip" empty
rspec ./spec/features/omniture_trac
You can’t perform that action at this time.