Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
👨‍💻 💻 🖱️ 🍻 🏋️‍♂️

rusllonrails rusllonrails

💭
👨‍💻 💻 🖱️ 🍻 🏋️‍♂️
View GitHub Profile
@rusllonrails
rusllonrails / NICE UBUNTU SIMPLE SCREEN RECORDER
Created Feb 11, 2017
NICE UBUNTU SIMPLE SCREEN RECORDER
View 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 Feb 7, 2017
Ubuntu crop using Image Magick in terminal
View 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 Feb 7, 2017
Heroku Rails getting "Can't verify CSRF token authenticity" even if csrf toke in present
View 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'
View 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
Решетки радиатора на Genesis Coupe
View Решетки радиатора на 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
View MYSQL query to file
http://zetcode.com/databases/mysqltutorial/exportimport/
View 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
View 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
View 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
View ImageMagick Crop Examples
http://www.imagemagick.org/Usage/crop/