Skip to content

Instantly share code, notes, and snippets.

View rusllonrails's full-sized avatar
💭
👨‍💻 💻 🖱️ 🍻 🏋️‍♂️

rusllonrails rusllonrails

💭
👨‍💻 💻 🖱️ 🍻 🏋️‍♂️
  • Tbilisi, Georgia
View GitHub Profile
@rusllonrails
rusllonrails / JUNIORs GUIDE
Created June 24, 2013 13:45
JUNIORs GUIDE
0.) Коротенькое видео о том как взаимодейтвуют сайты
http://www.youtube.com/watch?v=tj08374GsOk&list=UUhFcVtxhHg7uED8osbCsYhw&index=16
1.) HTML + CSS
http://ab-w.net/HTML/HTML.php
http://ab-w.net/CSS/CSS.php
2.) Javacript - основы языка
http://www.sdelaysite.com/javascript/javascript-video-1
@rusllonrails
rusllonrails / SIDEKIQ RUNIT
Last active April 24, 2023 09:15
SIDEKIQ RUNIT
sudo apt-get install runit
cd /etc/sv/
mkdir sidekiq
cd sidekiq
nano run
```
#!/bin/sh
cd /home/deployer/application/current/
@rusllonrails
rusllonrails / POSTGRESQL | JSONB LOOP ARRAYS EXAMPLE 2
Created August 9, 2015 14:28
POSTGRESQL | JSONB LOOP ARRAYS EXAMPLE 2
CREATE OR REPLACE FUNCTION test1(in_array jsonb)
RETURNS text[] AS $$
DECLARE
js jsonb := in_array;
i jsonb;
result_ids TEXT[];
uuid text;
state text;
version text;
@rusllonrails
rusllonrails / ImageMagick Batch replacing color with transparency
Last active March 25, 2022 10:20
ImageMagick Batch replacing color with transparency
http://graphicdesign.stackexchange.com/questions/16120/batch-replacing-color-with-transparency
http://www.mograblog.com/2013/04/removing-background-from-image-with.html
http://snippets.aktagon.com/snippets/558-how-to-remove-a-background-with-imagemagick
http://stackoverflow.com/questions/12424018/how-to-replace-white-background-color-with-transparent-of-an-image-in-imagemagic
http://www.imagemagick.org/discourse-server/viewtopic.php?t=18196
http://stackoverflow.com/questions/2322750/replace-transparency-in-png-images-with-white-background
http://stackoverflow.com/questions/10913944/set-background-color-opposite-of-transparent
http://stackoverflow.com/questions/12424018/how-to-replace-white-background-color-with-transparent-of-an-image-in-imagemagic
http://graphicdesign.stackexchange.com/questions/16120/batch-replacing-color-with-transparency
@rusllonrails
rusllonrails / POSTGRESQL JSONB BEST TUTORIALS
Last active October 10, 2021 04:52
POSTGRESQL JSONB BEST TUTORIALS
MIKE WANT US TO CARE ABOUT:
1) INDEXES
http://blog.2ndquadrant.com/jsonb-type-performance-postgresql-9-4/
2) TRY TO USE VIEW ON SIMPLE SEARCH
http://www.postgresql.org/docs/9.3/static/rules-materializedviews.html
GUIDES
1) http://schinckel.net/2014/05/25/querying-json-in-postgres/
1) see the list of opened ports
```
$ netstat -ntlp | grep LISTEN
tcp 0 0 127.0.0.1:27017 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN -
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:5433 0.0.0.0:* LISTEN -
@rusllonrails
rusllonrails / SETUP POSTGRES on UBUNTU
Last active August 17, 2018 10:12
SETUP POSTGRES on UBUNTU
SOURCE:
http://hexvolt.blogspot.ru/2012/11/postgresql-91-ubuntu-1204.html
1.) Install
sudo apt-get update
sudo apt-get install postgresql-9.1
2.) Set new password for postgres user
sudo passwd postgres
@rusllonrails
rusllonrails / POSTGRESQL | LOOP JSONB ARRAY
Created August 9, 2015 14:00
POSTGRESQL | LOOP JSONB ARRAY
CREATE OR REPLACE FUNCTION test1(in_array jsonb)
RETURNS jsonb AS $$
DECLARE
js jsonb := in_array;
i jsonb;
BEGIN
raise notice ' ';
raise notice 'js: %', js;
raise notice ' ';
@rusllonrails
rusllonrails / NICE UBUNTU SIMPLE SCREEN RECORDER
Created February 11, 2017 12:46
NICE UBUNTU SIMPLE SCREEN RECORDER
http://www.tecmint.com/screencasting-with-simple-screen-recorder-in-linux/
http://www.tecmint.com/best-linux-screen-recorders-for-desktop-screen-recording/
@rusllonrails
rusllonrails / Ubuntu crop using Image Magick in terminal
Created February 7, 2017 20:06
Ubuntu crop using Image Magick in terminal
convert Desktop/image.png -crop 50x50+50+50 Desktop/chart-cropped.png