Skip to content

Instantly share code, notes, and snippets.

View johan--'s full-sized avatar

johan pretorius johan--

View GitHub Profile
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jre
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
@johan--
johan-- / ubuntu14.04-command-line-install-android-sdk
Created February 10, 2018 10:11 — forked from wenzhixin/ubuntu14.04-command-line-install-android-sdk
Ubuntu 14.04 command line install android sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@johan--
johan-- / config.coffee
Created February 1, 2018 08:36 — forked from richpeck/config.coffee
CKEditor Upload Options Coffeescript
#################################################
#################################################
## _____ _ __ _____ _ _ _ ##
## / __ \| | / /| ___| | (_) | ##
## | / \/| |/ / | |__ __| |_| |_ ___ _ __ ##
## | | | \ | __|/ _` | | __/ _ \| '__| ##
## | \__/\| |\ \| |__| (_| | | || (_) | | ##
## \____/\_| \_/\____/\__,_|_|\__\___/|_| ##
## ##
#################################################
@johan--
johan-- / payment.component.css
Created January 19, 2018 13:11 — forked from shah-smit/payment.component.css
Stripe Payment into Angular 4
* {
font-family: "Helvetica Neue", Helvetica;
font-size: 15px;
font-variant: normal;
padding: 0;
margin: 0;
}
html {
height: 100%;
@johan--
johan-- / readme.md
Created January 16, 2018 09:04 — forked from maxivak/readme.md
Integrating Gem/Engine and Main Rails App
@johan--
johan-- / clean-up-boot-partition-ubuntu.md
Created December 18, 2017 13:06 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@johan--
johan-- / postgresql_configuration_on_ubuntu_for_rails.md
Created December 12, 2017 04:06 — forked from p1nox/postgresql_configuration_on_ubuntu_for_rails.md
PostgreSQL configuration without password on Ubuntu for Rails

Abstract

You could have postgre installed on localhost with password (or without user or password seted after instalation) but if we are developing we really don't need password, so configuring postgre server without password for all your rails project is usefull.

Install Postgre packages

  • postgresql
  • postgresql-client
  • libpq-dev
@johan--
johan-- / query.sql
Created July 21, 2017 13:59 — forked from ramiroaznar/query.sql
Routing Query & Styles with CARTO's Location Data Services API
SELECT
1 as cartodb_id, length, shape as the_geom, 'Madrid' as origin
FROM
cdb_route_point_to_point(
cdb_geocode_namedplace_point('Madrid', 'Spain'),
cdb_geocode_namedplace_point('Rome', 'Italy'),
'car')
UNION ALL
SELECT
2 as cartodb_id, length, shape as the_geom, 'Paris' as origin
@johan--
johan-- / README.md
Created July 21, 2017 13:59 — forked from ramiroaznar/README.md
ramiroaznar meta gist

Meta Gist

  • PostgreSQL and PostGIS queries
  • CartoCSS styles
  • CARTO.js blocks
  • DI.js blocks
  • Leaflet.js blocks
  • Other blocks
  • Others
@johan--
johan-- / query.sql
Created July 21, 2017 13:55 — forked from ramiroaznar/query.sql
How to use CARTO cdb_route_with_waypoints function
WITH ap AS (
SELECT
array_agg(the_geom) as arr
FROM
etapas
)
SELECT
(cdb_route_with_waypoints(arr, 'walk')).*
FROM
ap