Skip to content

Instantly share code, notes, and snippets.

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

rusllonrails rusllonrails

💭
👨‍💻 💻 🖱️ 🍻 🏋️‍♂️
  • Tbilisi, Georgia
View GitHub Profile
@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
@rusllonrails
rusllonrails / Heroku Rails getting "Can't verify CSRF token authenticity" even if csrf toke in present
Created February 7, 2017 15:15
Heroku Rails getting "Can't verify CSRF token authenticity" even if csrf toke in present
Myapp::Application.config.session_store :cookie_store, key: '_myapp_session',:domain => :all
to
Myapp::Application.config.session_store :cookie_store, key: '_myapp_session'
@rusllonrails
rusllonrails / CRON GUIDE
Last active December 23, 2016 10:39
CRON GUIDE
https://help.ubuntu.com/community/CronHowto
00 00 * * * ruby path/to/your/script.rb
Syntax:
mm hh dd mt wd command
mm minute 0-59
hh hour 0-23
dd day of month 1-31
@rusllonrails
rusllonrails / Решетки радиатора на Genesis Coupe
Last active May 6, 2016 12:34
Решетки радиатора на Genesis Coupe
http://k-tuning.com/genesisc?bfilter=f3:18;
http://tuningleader.ru/category/genesis-coupe-/
http://k-tuning.com/genesisc/reshetka-radiatora-hyundai-genesis-coupe-roadruns.html
http://tuningleader.ru/product/reshetka-radiatora-roadruns_1y/
http://k-tuning.com/genesisc/reshetka-radiatora-type-d-hyundai-genesis-coupe-m-and-s.html
http://www.aliexpress.com/price/genesis-coupe-grill_price.html
http://www.aliexpress.com/popular/genesis-front-grill.html
@rusllonrails
rusllonrails / MYSQL query to file
Created March 31, 2016 12:11
MYSQL query to file
http://zetcode.com/databases/mysqltutorial/exportimport/
@rusllonrails
rusllonrails / MYSQL REMOTE ACCESS
Created March 3, 2016 18:40
MYSQL REMOTE ACCESS
To expose MySQL to anything other than localhost you will have to have the following line uncommented in /etc/mysql/my.cnf and assigned to your computers IP address and not loopback
#Replace xxx with your IP Address
bind-address = xxx.xxx.xxx.xxx
Or add a bind-address = 0.0.0.0 if you don't want to specify the IP
Then stop and restart MySQL with the new my.cnf entry. Once running go to the terminal and enter the following command.
lsof -i -P | grep :3306
That should come back something like this with your actual IP in the xxx's
@rusllonrails
rusllonrails / MYSQL upgrade with existing dbs
Created March 3, 2016 17:27
MYSQL upgrade with existing dbs
First make a backup of your /var/lib/mysql/ directory just to be safe.
sudo mkdir /home/<your username>/mysql/
cd /var/lib/mysql/
sudo cp * /home/<your username>/mysql/ -R
Next purge MySQL (this will remove php5-mysql and phpmyadmin as well as a number of other libraries so be prepared to re-install some items after this.
sudo apt-get purge mysql-server-5.1 mysql-common
Remove the folder /etc/mysql/ and it's contents
@rusllonrails
rusllonrails / CHEF upgrade from 11 to 12
Created March 3, 2016 13:48
CHEF upgrade from 11 to 12
# 1 Remove old chef
```
sudo rm -rf chef-solo/
sudo rm -rf /opt/chef
sudo apt-get remove chef
sudo apt-get remove chef-server-core
```
# 2 Install new chef
bundle exec knife solo prepare <IP ADDRESS> -x root --bootstrap-version=12
@rusllonrails
rusllonrails / ImageMagick Crop Examples
Created November 6, 2015 16:42
ImageMagick Crop Examples
http://www.imagemagick.org/Usage/crop/