Skip to content

Instantly share code, notes, and snippets.

View dmitry-ilyashevich's full-sized avatar

Dzmitry Ilyashevich dmitry-ilyashevich

View GitHub Profile
@dmitry-ilyashevich
dmitry-ilyashevich / iceberg_light.conf
Created November 11, 2022 09:17 — forked from gkeep/iceberg_light.conf
Iceberg light theme for kitty terminal
background #e8e9ec
foreground #33374c
selection_background #d2d4dd
selection_foreground #33374c
cursor #33374c
cursor_text_color #e8e9ec
# white
@dmitry-ilyashevich
dmitry-ilyashevich / gist:f1149cb18c74a7864b1aa15394461b0b
Created December 17, 2018 12:14 — forked from wrburgess/gist:5528649
Backup Heroku Postgres database and restore to local database

Grab new backup of database

Command: heroku pgbackups:capture --remote production

Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712

Get url of backup download

Command: heroku pgbackups:url [db_key] --remote production

@dmitry-ilyashevich
dmitry-ilyashevich / install-comodo-ssl-cert-for-nginx.rst
Created August 12, 2017 16:14 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@dmitry-ilyashevich
dmitry-ilyashevich / SassMeister-input.scss
Created January 24, 2014 13:28
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
// Counts the number of occurrences of each value of $list
// -------------------------------------------------------------------------------
// @param $list [List] : list
// -------------------------------------------------------------------------------
// @return [Map]
@dmitry-ilyashevich
dmitry-ilyashevich / SassMeister-input-HTML.html
Created January 13, 2014 17:30
Generated by SassMeister.com.
<div></div>
def to_i(w)
r = 0
w.each_char { |ch| r = r | (1 << ch.ord - 96) }
r
end
@dict_word_letters = {}
class KoModel
indexed_error_for: (property_name, index, nested_property = null) =>
ko.computed =>
return unless @errors() and error_property = @errors()[property_name]
error = jQuery.grep error_property, (item) ->
item.index == index
return '' unless error and error.length
# 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL
# 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew
# https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers
# 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it
gem install bundler
# 1. Get edge Rails source (master branch)
git clone https://github.com/rails/rails.git