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

Install & Configure

  1. Install DNSMasq
$ brew install dnsmasq
  1. Install DNSCrypt-proxy
$ brew install dnscrypt-proxy
#
# This file is the units database for use with GNU units, a units conversion
# program by Adrian Mariano adrianm@gnu.org
#
# March 2014 Version 2.10
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006
# 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014
# Free Software Foundation, Inc
#
CarrierWave.configure do |config|
if Rails.env.development? || Rails.env.test?
config.storage = :file
else
config.storage = :fog
config.fog_credentials = {
:provider => 'OpenStack',
:openstack_auth_url => 'https://auth.selcdn.ru/v1.0',
:openstack_username => Rails.application.secrets.openstack_username,
:openstack_api_key => Rails.application.secrets.openstack_api_key
@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