Skip to content

Instantly share code, notes, and snippets.

# show all active connections
netstat -napt
@lorenadl
lorenadl / wordpress_ssl_insecure_content_fixer.txt
Created April 19, 2018 15:54
[Wordpress] extension for mixed content: SSL Insecure Content Fixer
insecure content fixer
https://it.wordpress.org/plugins/ssl-insecure-content-fixer/
@lorenadl
lorenadl / rake_commands_db.txt
Created April 24, 2018 08:48
Rake commands for db
UPDATE for rails 3.2.12:
db:create creates the database for the current env
db:create:all creates the databases for all envs
db:drop drops the database for the current env
db:drop:all drops the databases for all envs
db:migrate runs migrations for the current env that have not run yet
db:migrate:up runs one specific migration
db:migrate:down rolls back one specific migration
db:migrate:status shows current migration status
@lorenadl
lorenadl / redirect.php
Created April 24, 2018 09:25
[PHP] Redirect to another site/page
<? header("location: http://www.my_site.ext"); ?>
@lorenadl
lorenadl / docker.txt
Last active June 11, 2018 09:18
[ROR] Docker for Rails applications
Docker
-------------------------
Se lanciando
> docker images
o
> docker-compose up --build
dà questo errore:
@lorenadl
lorenadl / markdown_cheatsheet.txt
Created April 24, 2018 10:15
Markdown cheatsheet
#Heading 1
##Heading 2
###Heading 3
####Heading 4
#####Heading 5
######Heading 6
---
Paragraph
@lorenadl
lorenadl / linux_list_users
Created April 26, 2018 14:29
Linux list users command
Linux list all users command
$ cat /etc/passwd
@lorenadl
lorenadl / linux_ror_install_rvm_ruby_rails_and_setup_ror_app_on_centos.md
Last active May 14, 2018 14:55
[Linux+RoR] Install RVM + Ruby + Rails and set up a RoR application on CentOS

Install RVM + Ruby + Rails and set up a RoR application on CentOS

Installation

Install RVM

Install RVM with latest Ruby version:

\curl -L https://get.rvm.io | bash -s stable --ruby

Test if RVM is correctly installed:

@lorenadl
lorenadl / linux_commands.md
Created April 26, 2018 16:18
Linux commands

Show processes:

ps -afx

Killing a process:

kill -INT prcess_id

Viewing active connections: