Skip to content

Instantly share code, notes, and snippets.

View EloneSampaio's full-sized avatar

Sam EloneSampaio

View GitHub Profile
@EloneSampaio
EloneSampaio / churn-keras-model.ipynb
Created June 10, 2022 18:55 — forked from ocoyawale/churn-keras-model.ipynb
How to build a simple Keras model with Tensorflow backend
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@EloneSampaio
EloneSampaio / metabase-setup.md
Created October 12, 2021 17:05 — forked from r0lodex/metabase-setup.md
Metabase Setup

Installing and Setting Up Metabase with Postgres

This guide is written for installation of Metabase on Ubuntu 18.04. Instead of using H2 as the application database, we will be using Postgres. You can opt to use MySQL as well. Please follow the steps below:

  • Update and install Java with proper configuration
sudo apt-get update
@EloneSampaio
EloneSampaio / openssl_commands.md
Created July 29, 2021 15:15 — forked from Hakky54/openssl_commands.md
Some list of openssl commands for check and verify your keys

openssl 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@EloneSampaio
EloneSampaio / lamp.sh
Created June 3, 2020 19:31 — forked from UbuntuEvangelist/Completely Uninstall LAMP Ubuntu
Completely Uninstall LAMP Ubuntu 18.04 LTS
#!/bin/bash
# This will remove Apache
sudo service apache2 stop
sudo apt-get purge apache2 apache2-utils apache2.2-bin apache2-common
sudo apt remove apache2.*
sudo apt-get autoremove
whereis apache2
sudo rm -rf /etc/apache2
@EloneSampaio
EloneSampaio / Octave.md
Created August 31, 2018 21:02 — forked from mracos/Octave.md
Matemática simbólica com octave

Matemática simbólica com Octave.

  • Aquecimento
  • [Introdução] (#introdução)
  • [Exemplos] (#exemplos)
    • [Derivadas] (#derivadas)
      • [Gradiente] (#gradiente)
    • [Integrais] (#integrais)
    • [Máximos e Mínimos] (#máximos e mínimos)
@EloneSampaio
EloneSampaio / wkhtmltopdf.sh
Created August 26, 2018 20:59 — forked from faniska/wkhtmltopdf.sh
Install wkhtmltopdf with patched QT on Ubuntu Linux
# Uncomment the next line if you have installed wkhtmltopdf
# sudo apt remove wkhtmltopdf
cd ~
# Select an appropriate link for your system (32 or 64 bit) from the page https://wkhtmltopdf.org/downloads.html and past to the next line
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvf wkhtmltox*.tar.xz
sudo mv wkhtmltox/bin/wkhtmlto* /usr/bin
sudo apt-get install -y openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig
#!/bin/bash
sudo adduser --system --quiet --shell=/bin/bash --home=/opt/odoo --gecos 'odoo' --group odoo
sudo mkdir /etc/odoo && mkdir /var/log/odoo/
sudo apt-get update && apt-get upgrade -y && apt-get install postgresql postgresql-server-dev-9.3 build-essential python-imaging python-lxml python-ldap python-dev libldap2-dev libsasl2-dev npm nodejs git python-setuptools libxml2-dev libxslt1-dev libjpeg-dev python-pip gdebi -y
git clone --depth=1 --branch=8.0 https://github.com/odoo/odoo.git /opt/odoo/odoo
sudo chown odoo:odoo /opt/odoo/ -R && sudo chown odoo:odoo /var/log/odoo/ -R && cd /opt/odoo/odoo && sudo pip install -r requirements.txt
sudo npm install -g less less-plugin-clean-css -y && sudo ln -s /usr/bin/nodejs /usr/bin/node
cd /tmp && wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && sudo gdebi -n wkhtmltox-0.12.2.1_linux-trusty-amd64.deb && rm wkhtmltox-0.12.2.1_linux-trusty-amd64.deb
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin/ && sudo ln -s /usr
@EloneSampaio
EloneSampaio / genymotionwithplay.txt
Created December 13, 2016 18:18 — forked from wbroek/genymotionwithplay.txt
Genymotion with Google Play Services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
@EloneSampaio
EloneSampaio / auth.js
Created August 19, 2016 00:42 — forked from katowulf/auth.js
Auth with Firebase 3.x and Cordova/Ionic using ngCordova oauth.
this.$cordovaOauth.facebook("your_client_id", ["email"])
.then(function (result) {
var credentials = firebase.auth.FacebookAuthProvider.credential(result.access_token);
return firebase.auth().signInWithCredential(credentials);
})
.then(function (firebaseUser) {
console.log("Signed in as:", firebaseUser.uid);
})
.catch(function (error) {
console.error("Authentication failed:", error);
@EloneSampaio
EloneSampaio / handlebars-helper-x.js
Created July 30, 2016 00:29 — forked from akhoury/handlebars-helper-x.js
Handlebars random JavaScript expression execution, with an IF helper with whatever logical operands and whatever arguments, and few more goodies.
// for demo: http://jsbin.com/jeqesisa/7/edit
// for detailed comments, see my SO answer here http://stackoverflow.com/questions/8853396/logical-operator-in-a-handlebars-js-if-conditional/21915381#21915381
/* a helper to execute an IF statement with any expression
USAGE:
-- Yes you NEED to properly escape the string literals, or just alternate single and double quotes
-- to access any global function or property you should use window.functionName() instead of just functionName()
-- this example assumes you passed this context to your handlebars template( {name: 'Sam', age: '20' } ), notice age is a string, just for so I can demo parseInt later
<p>
{{#xif " this.name == 'Sam' && this.age === '12' " }}