Skip to content

Instantly share code, notes, and snippets.

View johan--'s full-sized avatar

johan pretorius johan--

View GitHub Profile
@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
@johan--
johan-- / Gemfile
Created June 30, 2017 09:43 — forked from Joseph-N/Gemfile
File upload using dropzone.js, paperclip in rails. Tutorial link http://josephndungu.com/tutorials/ajax-file-upload-with-dropezonejs-and-paperclip-rails
source 'https://rubygems.org'
# default gems here
#---------------------------
# add paperclip and bootstrap
gem "paperclip", "~> 4.1"
gem 'bootstrap-sass', '~> 3.1.1'
@johan--
johan-- / README.md
Created June 21, 2017 13:46 — forked from jsanz/README.md
CartoDB.js examples: add sublayers

This example shows how to create a Leaflet map with a basemap and an empty CartoDB.js layer. Once the layer is created a function is attached the event of the layers selector checkboxes so on any state change, the sublayers are removed and recreated according to the user selection.