Skip to content

Instantly share code, notes, and snippets.

View the-teacher's full-sized avatar
💻
Working remotely

Ilya N. Zykin the-teacher

💻
Working remotely
View GitHub Profile
wget http://static.jonof.id.au/dl/kenutils/pngout-20130221-linux.tar.gz
tar -xvf pngout-20130221-linux.tar.gz
cp pngout-20130221-linux/x86_64/pngout /user/bin/pngout
sudo apt-get install postgresql postgresql-client postgresql-contrib libpq-dev postgresql-server-dev-9.1 pgadmin3 -y
sudo -u postgres psql postgres
CREATE ROLE "ADMIN_NAME" PASSWORD 'qwerty' SUPERUSER CREATEDB CREATEROLE INHERIT LOGIN;
\q
sudo /etc/init.d/postgresql restart
psql postgres ADMIN_NAME
SELECT version();
> CREATE USER 'edu37'@'localhost' IDENTIFIED BY '***';
> GRANT USAGE ON * . * TO 'edu37'@'localhost' IDENTIFIED BY '***' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
> GRANT ALL PRIVILEGES ON `edu37_production` . * TO 'edu37'@'localhost';
https://gist.github.com/the-teacher/8080831
@the-teacher
the-teacher / gist:ae323ff8999f13300fe4
Created October 15, 2015 07:16
Debian, Linux, Ubuntu mirrors change
/etc/apt/sources.list
http://ftp.nl.debian.org/debian/README.mirrors.txt
@the-teacher
the-teacher / dba-user.json
Created October 14, 2015 12:43 — forked from lusis/dba-user.json
Managing MySQL user accounts with Chef
{
"id":"dbauser",
"uid":506,
"comment":"DBA User",
"shell":"/bin/bash",
"groups": [
"sysadm",
"dba"
],
"ssh_key": "XXXXXXXXXX"
@the-teacher
the-teacher / vagrant.md
Created September 25, 2015 16:45
Vagrant.startup

HOST MACHINE

  brew cask install virtualbox
  brew cask install vagrant
  brew cask install vagrant-manager
  vagrant plugin install vagrant-vbguest
@the-teacher
the-teacher / delete_all_gems.rb
Created September 25, 2015 14:50
delete all gems
# Delete all gems:
gem list | cut -d' ' -f1 | xargs gem uninstall -aIx
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done
@the-teacher
the-teacher / install-comodo-ssl-cert-for-nginx.rst
Last active September 5, 2015 11:13 — 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

= form_for @user, html: { enctype: "multipart/form-data", role: :form, class: 'form-inline' } do |f|
.form-group
= f.label :username, "Имя пользователя"
= f.text_field :username, class: 'form-control'
.form-group
= f.label :raw_about, "О себе"
= f.text_area :raw_about, class: 'form-control', style: 'height: 200px;'
.form-group