Skip to content

Instantly share code, notes, and snippets.

View Magicdream's full-sized avatar

Mikhail Magicdream

View GitHub Profile
@Magicdream
Magicdream / online_logo_makers_promo_codes.md
Last active October 25, 2022 11:57
Coupon codes for online logo makers: Turbologo.com, LogoJoy.com, TailorBrands.com, etc

Online Logo Makers Coupon Codes

Use that promo-codes to get discounts on most popular online logo maker services:

  1. Turbologo.com use coupon code promo_design to get 15% discount on any logo package. This is best service in terms of price and value and I highly recommend that. The price is very reasonable and you can edit and download your logo unlimited times for free. Also they have business package files: business card, blank, envelope, favicon, social media kit. Online support is very responsive and can customize logo design. I'd rate that service as 9/10.
  2. LogoJoy.com use coupon code SIMPLE to get 15% on first logo design. This service is pricey and has disadvantages, like you can't easily edit your logo after payment. I'd rate that site as 8/10. Expensive and limited.
  3. TailorBrands.com use coupon code SAVE25 to get 25%. Note that TailorBrands has monthly subscription, so I'm not sure that this is best choice
\x auto
@Magicdream
Magicdream / gist:0d00a382d015933210cd
Created November 24, 2015 10:40
El Capitan rmagick install
cp /usr/local/Cellar/gmp/6.1.0/lib/* /usr/local/Cellar/imagemagick/6.9.2-6/lib/
def sum_array(data)
data
end
def test
def expect_to_be_true(condition)
raise "#{condition} it not true" unless eval(condition)
end
expect_to_be_true "sum_array([[1, 1000]]) == [[1, 1000]]"
@Magicdream
Magicdream / exec.sh
Created February 12, 2015 17:13
Process exec time
# $$ - number of process
ps -p $$ -o etime=
@Magicdream
Magicdream / select_columns.sql
Created November 14, 2014 09:55
Select column names
select array_to_string(array(
select column_name::text from information_schema.columns where table_name = ''),
' ');
@Magicdream
Magicdream / select_biggest_indexes.sql
Last active August 29, 2015 14:08
Select biggest indexes
SELECT
t.tablename,
indexname,
c.reltuples AS num_rows,
pg_size_pretty(pg_relation_size(quote_ident(t.tablename)::text)) AS table_size,
pg_size_pretty(pg_relation_size(quote_ident(indexrelname)::text)) AS index_size,
CASE WHEN indisunique THEN 'Y'
ELSE 'N'
END AS UNIQUE,
idx_scan AS numaber_of_scans,
@Magicdream
Magicdream / _messages.html.haml
Created December 2, 2013 11:51
Angular js partial
.conversations
.conversation(ng-repeat = "discussion in target_discussions = (actual_discussions() | filter:doFilter | orderBy:'last_message_at':true)" ng-class='{highlight: discussion.last_message_author_id==user_config.id, new: discussion.unread_count > 0}')
.today-separator(ng-show="delimitFromPrevious(discussion, $index)")
За сегодня
%hr
Ранее
/ .today-separator
/ За сегодня
/ %hr
/ Ранее
@Magicdream
Magicdream / helpers_performance.rb
Last active December 29, 2015 08:08
Performance tests of different helper methods
# Ruby 2.0. Rails 3.2.15
# content_tag performance
# this test shows that content_tag is very slow, especially with block
Benchmark.bm do |x|
x.report { helper.content_tag(:p){ "Hello World" } }
x.report { helper.content_tag :p, "Hello World" }
x.report { %{<p>Hello World</p>} }
end
Failures:
1) MailFetcher common extract token
Screenshot: /home/nartov/projects/avers/tmp/capybara/screenshot_2013-03-15-14-49-57.992.png
Failure/Error: @fetcher.extract_token.should == "fa0640795d6652cb9772e5ac1a30eaf42a64d98b"
expected: "fa0640795d6652cb9772e5ac1a30eaf42a64d98b"
got: nil (using ==)
# /home/nartov/.rvm/gems/ruby-1.9.3-p327-falcon@prohq/gems/rspec-expectations-2.11.3/lib/rspec/expectations/fail_with.rb:33:in `fail_with'
# /home/nartov/.rvm/gems/ruby-1.9.3-p327-falcon@prohq/gems/rspec-expectations-2.11.3/lib/rspec/matchers/operator_matcher.rb:47:in `fail_with_message'
# /home/nartov/.rvm/gems/ruby-1.9.3-p327-falcon@prohq/gems/rspec-expectations-2.11.3/lib/rspec/matchers/operator_matcher.rb:69:in `__delegate_operator'