Skip to content

Instantly share code, notes, and snippets.

View davidjguru's full-sized avatar
🍅
Working within a pomodoro cycle

David Rodriguez davidjguru

🍅
Working within a pomodoro cycle
View GitHub Profile
@davidjguru
davidjguru / How to deploy SevillaDevelopers
Last active March 24, 2019 20:53
Installation guide for sevilladevelopers in Ubuntu
#Steps for install and deploy the SevillaDevelopers github.io page on a local environment
#OS: Ubuntu 16.10 - Yakkety
#Step 0 Get a fork from https://github.com/SevillaDevelopers/sevilladevelopers.github.io to your Github account
#First, installing git
sudo apt-get install git
#Get a local copy from your remote fork
git clone https://github.com/YOUR_USER_NAME/sevilladevelopers.github.io.git
#Move to your local new directory
@davidjguru
davidjguru / Setting Drupal Default Theme with Drush.txt
Created April 24, 2017 14:01
Change Drupal default theme with Drush
# How to know what is the current theme on your Drupal site
# move inside project root directory var/www and then
drush status theme
#the above command will tell you the current theme set as default for site and admin both
# Change the site default theme using the below command (use theme name of your choice)
drush vset theme_default garland
# the above command will make garland as default site theme
# now change admin default theme using the below command (use theme name of your choice)
@davidjguru
davidjguru / Balsamiq on Lubuntu
Last active May 9, 2017 12:47
Three (or four) steps for installing Balsamiq over Linux
wget https://builds.balsamiq.com/mockups-desktop/Balsamiq_Mockups_3.5.9_bundled.zip
cd /home/davidjguru/Downloads/
unzip Balsamiq_Mockups_3.5.9_bundled.zip
wine Balsamiq_Mockups_3.5.9.exe
[project_name]-[short-description]-[issue-number]-[comment-number]-[drupal-version].patch
youtube-dl --verbose --extract-audio --audio-format mp3 -l https://www.youtube.com/watch?v=CODE
@davidjguru
davidjguru / Setting up Facebook Page Plugin for every node on Drupal 7
Last active August 29, 2017 23:03
I don't need a unique widget for the whole website. I need N Facebook PagePlugin widgets to display within M nodes of a specific content type.
# First, I've created a new text field for the content type called facebook_direction.
# Second, I got the facebook script given by Facebook Developers.
# Third, I wrote some PHP code for get the info about the current node and
# processing the field values asociated to the node.
# Fourth, I've changed the URL values from the snippet with PHP code to get
# every facebook page from every node.
# Fifth, I made a new custom block in my Drupal site, called "facebook stream widget"
# Sixth, I've inserted the code in the custom block body with PHP editor active,
# marking the block as only for content types of kind "companies".
# Add: I made sure that only the Facebook widget view is created yes and only if the
# Ok, I'm getting old and write this gist only because
# my damaged memory.
sudo apt-get install sshpass
alias nameproject=’sshpass -p psswrd ssh root@serverdirection -p portnumber'
# Now, only nameproject in prompt and goes to server.
# Access to SQLite prompt
sqlite3;
# You're in sqlite>
# Open the database
.open /path/to/database/database.db
# Show databases in the current database connection
.database
@davidjguru
davidjguru / tmux-cheatsheet.markdown
Created November 19, 2017 10:38 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
## Getting Vagrant
wget https://releases.hashicorp.com/vagrant/2.0.1/vagrant_2.0.1_x86_64.deb?_ga=2.82700054.164498689.1514303275-2027648582.1514303275
## Installing a provider
sudo apt-get install virtualbox
## Installing Vagrant
sudo dpkg -i vagrant_2.0.1_x86_64.deb
## Creating the Vagrantfile