Skip to content

Instantly share code, notes, and snippets.

View ccamara's full-sized avatar

Carlos Cámara ccamara

View GitHub Profile
@ccamara
ccamara / README.md
Created June 14, 2018 11:39 — forked from jsanz/README.md
MapboxGL + OSM data

Simple script to get data (nodes and polygons separately) from OSM using Overpass API and render it on a Mapbox GL map.

This is probably a work in progress.

To do:

  • Work on having to do just a single call to the Overpass API and then split the geometries by type.
  • Better styling
  • Popups?
@ccamara
ccamara / .inputrc.sh
Last active August 29, 2015 14:16 — forked from rodrigoaguilera/gist:dc3c6d7e1c035e2b45e0
rename file to .inputrc and place it into home folder.
# Make Tab autocomplete regardless of filename case
set completion-ignore-case on
# List all matches in case multiple possible completions are possible
set show-all-if-ambiguous on
# Immediately add a trailing slash when autocompleting symlinks to directories
set mark-symlinked-directories on
# Use the text that has already been typed as the prefix for searching through
#!/bin/sh
# Install Command line tools (requires Xcode from app store)
xcode-select --install
# install homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
mkdir ~/bin
mkdir ~/.composer
mkdir -p ~/.vim/swaps
@ccamara
ccamara / template.php
Last active August 29, 2015 13:57 — forked from gionn/gist:2308768
Modifying #drupal #search-form
<?php
function theme_form_alter(&$form, &$form_state, $form_id) {
if ($form_id == 'search_block_form') {
$form['search_block_form']['#title'] = t('Search'); // Change the text on the label element
$form['search_block_form']['#title_display'] = 'invisible'; // Toggle label visibilty
//$form['search_block_form']['#size'] = 40; // define size of the textfield
$form['search_block_form']['#default_value'] = t('Search'); // Set a default value for the textfield
//$form['actions']['submit']['#value'] = t('GO!'); // Change the text on the submit button
$form['actions']['submit']['#value'] = decode_entities('&#61442;'); // Uses a unicode code (eg. useful when using awesomefonts)
//$form['actions']['submit'] = array('#type' => 'image_button', '#src' => base_path() . path_to_theme() . '/immagini/btnCerca.png'); // Adds an image
@ccamara
ccamara / .bash_profile
Last active December 31, 2015 14:49 — forked from modcab/gist:8002917
Aguasingas' .bash_profile, with some git goodness.
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
# Autocompletion for git.
# http://code-worrier.com/blog/autocomplete-git/
# Download doing curl https://raw.github.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi