Skip to content

Instantly share code, notes, and snippets.

@danjellesma
danjellesma / t3vsm5instance.csv
Created October 15, 2019 17:16
T3 vs M5 EC2 instances
type T3 M5
Cost (large) $0.0832 hourly .035
CPU Intel Skylake E5 2686 v5 Xeon Platinum 8000 (Skylake-SP)
CPU Clock 2.5 GHz 2.5 GHz
@danjellesma
danjellesma / datatables_sort_image_fix.md
Last active October 12, 2015 18:50
Fix Datatables sort images not working in Rails

Fix the sort images not working by editing jquery.dataTables.css

  1. Rename jquery.dataTables.css to jquery.dataTables.css.erb
  2. Update the image paths like below
table.dataTable thead .sorting {
  background-image: url(<%= image_path("sort_both.png") %>);
}
table.dataTable thead .sorting_asc {
@danjellesma
danjellesma / spinner.md
Last active May 13, 2019 03:44
Rails 4: Adding a spinner on link clicks

In Rails 4 it is useful to have a 'page loading' indicator when a user clicks a link. This is a simple way to accomplish that without external libraries. Tested on Rails 4 using TurboLinks.

Great Link for Spinning Loader gifs: http://loading.io/


On CSS Page:
.modal {
    display:    none;
 position: fixed;
@danjellesma
danjellesma / centos-7-vmware-template.md
Last active January 29, 2018 16:14
CentOS 7 VMware Customization

Created on: June 26, 2015

Last Updated: July 14, 2015

Synopsis: CentOS 7 on vSphere 5.5 does not clone out correctly using normal cloning methods. Running these fixes allows VMware to deploy from a CentOS 7 template with proper customizations.

Failure to perform these actions can result in :

  • Naming failure inside the VM
  • DNS Registration Failure
@danjellesma
danjellesma / 0_reuse_code.js
Last active August 29, 2015 14:11
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
@danjellesma
danjellesma / gist:8214324
Created January 2, 2014 02:58
Remove index.php on Ubuntu12 using Laravel 4.x
Change 1: Activate mod_rewrite by uncommenting it. # This did not work for me, but this did:
sudo a2enmod rewrite
Change 2: In /etc/apache2/apache2.conf -> Update Allow Override from None to All
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
@danjellesma
danjellesma / gist:8212033
Last active January 1, 2016 22:49
Install Oracle Java 7 on Ubuntu 12.x / 13.x
First you need to remove openjdk for this run the following command from your terminal
sudo apt-get purge openjdk*
If you installed java 7 from any other PPA and you are having problem with java then you have to do following steps before installing the PPA menctioned here
sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
@danjellesma
danjellesma / gist:6143306
Created August 2, 2013 20:41
Install VMware Tools on Linux
# After mounting ISO
mkdir /mnt/cdrom
mount /dev/cdrom /mnt/cdrom
cp /mnt/cdrom/VMwareTools-*.tar.gz /tmp
cd /tmp
tar -zxvf VMwareTools-*.tar.gz
cd vmware-tools-distrib
./vmware-install.pl -d