Skip to content

Instantly share code, notes, and snippets.

View kont-noor's full-sized avatar

Nickolay Kondratenko kont-noor

  • Cats-3x
  • Ukraine
View GitHub Profile
@kont-noor
kont-noor / README.md
Created March 3, 2021 11:04 — forked from chrisjm/README.md
LetsEncrypt, AWS Certificate Manager, and CloudFront

Using LetsEncrypt SSL certificates with AWS Certificate Manager and CloudFront

This is a document for managing LetsEncrypt certificates on AWS using AWS Certificate Manager and configuring on CloudFront using the AWS CLI.

Setup

Follow the instructions to set up the certbot and aws commands on your local machine:

@kont-noor
kont-noor / import.md
Created June 24, 2019 07:00 — forked from geraldvillorente/import.md
How to import database in MySQL in Docker?

This is a simple way of importing MySQL database in Docker.

  1. In you Dockerfile you must have a shared folder. Shared folder is a directory in your host machine that is mounted to Docker instance.

  2. Put the exported sql file in the shared folder.

  3. Login to your Docker instance via docker exec -it DOCKER_CONTAINER_ID bin/bash.

  4. Login to MySQL via mysql -u USERNAME -p.

@kont-noor
kont-noor / uninstall_gems.sh
Created October 30, 2018 11:32 — forked from IanVaughan/uninstall_gems.sh
Uninstall all rbenv gems
#!/usr/bin/env bash
uninstall() {
list=`gem list --no-versions`
for gem in $list; do
gem uninstall $gem -aIx
done
gem list
gem install bundler
}
#!/bin/bash
#
# Bash script to setup headless Selenium (uses Xvfb and Chrome)
# (Tested on Ubuntu 12.04) trying on ubuntu server 14.04
# Add Google Chrome's repo to sources.list
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | tee -a /etc/apt/sources.list
# Install Google's public key used for signing packages (e.g. Chrome)
# (Source: http://www.google.com/linuxrepositories/)
@kont-noor
kont-noor / solution.md
Created September 28, 2017 13:07 — forked from kendagriff/solution.md
Solution to "OpenSSL::X509::StoreError: setting default path failed: Invalid keystore format" for JRuby

Solution to StoreError: invalid keystore format (OS X)

The following error appeared upon upgrading JRuby:

OpenSSL::X509::StoreError: setting default path failed: Invalid keystore format

Download cacert.pem

@kont-noor
kont-noor / tmux-cheatsheet.markdown
Created February 8, 2016 09:13 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@kont-noor
kont-noor / gist:c0ccd52c7f00a3490518
Created October 12, 2015 12:03 — forked from jordelver/gist:3139365
How to write an image file to an SD card under Mac OS X (for Raspberry Pi)

Find the SD card device

In this case, the SD card is /dev/disk4. DO NOT get this wrong or you may destroy all the data on the wrong disk/card/drive.

diskutil list

/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *160.0 GB   disk0

1: EFI 209.7 MB disk0s1

@kont-noor
kont-noor / libusb-devel.rb
Created September 22, 2015 14:13 — forked from chambbj/libusb-devel.rb
My libusb-devel formula for Homebrew (for PCL installation on OS X Lion)
require 'formula'
class LibusbDevel < Formula
url 'https://github.com/OpenNI/OpenNI/blob/4dbf64bc45b880bfda6aa6bb2a30d1ddd03a8c65/Platform/Linux/Build/Prerequisites/libusb-1.0.8-osx.tar.bz2?raw=true'
homepage 'http://www.libusb.org/'
md5 '8ad20ec24b7612caf75a059a03f21dd8'
depends_on "automake" => :build
depends_on "libtool" => :build
@kont-noor
kont-noor / pre-commit
Last active August 29, 2015 14:17
git pre-commit hook
#!/bin/sh
#.git/hooks/pre-commit
patterns=("TODO" "binding.pry" "selenium")
status=0
for pattern in ${patterns[*]}
do
matches=`git-diff-index -p -M --cached HEAD -- | grep '^+' | grep -i "$pattern"`
matches_count=`git-diff-index -p -M --cached HEAD -- | grep '^+' | grep -i "$pattern" | wc -l`