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 / 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
@davidjguru
davidjguru / README-Template.md
Created February 18, 2018 11:50 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@davidjguru
davidjguru / Git and Branches.txt
Last active February 18, 2018 12:10
Git & Branches
## Create new branch and switch to it at the same time.
git checkout -b newbranch
## This is shorthand for:
## git branch newbranch
## git checkout newbranch
## Basic Merging
git checkout master
## Switched to branch 'master'