Skip to content

Instantly share code, notes, and snippets.

@alexislucena
alexislucena / gist:426860ff38567aa45071aef1a6ce4ff0
Created November 10, 2016 10:22
CFML: Setting the download file name of PDF created with cfdocument opened in the browser (tested in Lucee)
<cfheader name="Content-disposition" value="inline;filename=Page.pdf"/>
<cfdocument format="PDF">PDF file content</cfdocument>
@alexislucena
alexislucena / gist:089db39876a56c094519a91b1a062fda
Created November 10, 2016 11:25
Upgrade from Lucee 4.5 (or Railo 4.2) to Lucee 5 in Amazon Linux
http://docs.lucee.org/guides/lucee-5/upgrading-lucee-45.html
Download the lucee-5.x.x.xxx.jar from http://lucee.org/downloads.html
$ wget http://release.lucee.org/rest/update/provider/loader/5.1.0.34
Rename the downloaded file
$ mv 5.1.0.34 lucee-5.1.0.34.jar
Stop Railo-Lucee
$ sudo /opt/railo/railo_ctl stop
@alexislucena
alexislucena / uncommitLastCommit.md
Created November 14, 2016 08:56
Git: How to uncommit my last commit in git

To keep the changes from the commit you want to undo

$ git reset --soft HEAD^

To destroy the changes from the commit you want to undo

$ git reset --hard HEAD^

You can also say

@alexislucena
alexislucena / install-mysql-on-ubuntu-16.04.md
Last active December 2, 2016 09:10
Ubuntu: Install MySQL on Ubuntu 16.04

Update package index and packages:

$ sudo apt-get update
$ sudo apt-get upgrade

Install MySQL:

$ sudo apt-get install mysql-server

Set up MySQL:

@alexislucena
alexislucena / install-intellj-idea-on-ubuntu.md
Created December 2, 2016 10:33
Ubuntu: Install IntelliJ IDEA on Ubuntu

Check if Java is installed

$ java -version

Install Ubuntu Make from PPA

$ sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make
$ sudo apt-get update
$ sudo apt install ubuntu-make
@alexislucena
alexislucena / 0_reuse_code.js
Created December 5, 2016 10:50
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@alexislucena
alexislucena / install-atom-on-ubuntu-16.04.md
Created December 5, 2016 10:55
Ubuntu: Install Atom on Ubuntu 16.04 via unofficial PPA

Add PPA

$ sudo add-apt-repository ppa:webupd8team/atom

Update and install Atom editor

$ sudo apt update
$ sudo apt install atom
@alexislucena
alexislucena / install-oracle-java-8-on-ubuntu.md
Created December 5, 2016 12:22
Ubuntu: Install Oracle Java 8 on Ubuntu 16.04 via PPA

Add the PPA

 $ sudo add-apt-repository ppa:webupd8team/java

Update and install the installer script

$ sudo apt update
$ sudo apt install oracle-java8-installer

Set Java environment variables and Oracle JDK8 as default

@alexislucena
alexislucena / install-scala-sbt-and-java-on-ubuntu.md
Created December 5, 2016 12:35
Ubuntu: Install Scala, SBT and Java on Ubuntu 16.04

Install Scala 2.11.8

$ sudo apt-get remove scala-library scala
$ sudo wget www.scala-lang.org/files/archive/scala-2.11.8.deb
$ sudo dpkg -i scala-2.11.8.deb

Check Scala version

$ scala -version
@alexislucena
alexislucena / vagrant-basic-commands
Last active February 27, 2017 10:51
Vagrant basic commands
$ vagrant up
$ vagrant halt
$ vagrant suspend (hibernate)
$ vagrant ssh
$ vagrant status
$ vagrant destroy