Skip to content

Instantly share code, notes, and snippets.

Carlos Cámara ccamara

Block or report user

Report or block ccamara

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ccamara
ccamara / README.md
Created Jun 14, 2018 — forked from jsanz/README.md
MapboxGL + OSM data
View README.md

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 / sample-ggplot.R
Created Feb 28, 2017
Annotation in #R #ggplot
View sample-ggplot.R
# Source: http://sharpsightlabs.com/blog/simple-annotate-plot-ggplot2/
ggplot(df, aes(x = Año, y = Población, group = 1)) +
geom_line(colour = "red", size = 1.5) +
geom_point(colour = "red", size = 4, shape = 21, fill = "white") +
geom_text(aes(label = Año), size = 3, hjust = 0.5, vjust = 3, position = "stack") +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
ggtitle("Evolución de población en Detroit") +
labs(x = "Año", y = "Población") +
geom_vline(xintercept = 1973, linetype = "dashed") +
@ccamara
ccamara / osm-download.model
Last active Jun 27, 2016
Example of non-working QGIS model
View osm-download.model
{
"values": {
"inputs": {
"STRING_CITY": {
"values": {
"pos": {
"values": {
"y": 22.0,
"x": 120.0
},
@ccamara
ccamara / ediciones-usj.csl.xml
Last active Aug 29, 2015
Ediciones Universidad San Jorge #citation-style #zotero. Rename it to remove the xml extension and add it to your Zotero.
View ediciones-usj.csl.xml
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never">
<!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) -->
<info>
<title>Ediciones Universidad San Jorge</title>
<title-short>Ediciones USJ</title-short>
<id>http://www.zotero.org/styles/ediciones-universidad-san-jorge</id>
<link rel="self" href="http://www.zotero.org/styles/ediciones-universidad-san-jorge"/>
<author>
<name>Carlos Cámara</name>
@ccamara
ccamara / urbs.csl.xml
Created Apr 28, 2015
URBS Revista de Estudios Urbanos y Ciencias Sociales #citation-style for #zotero
View urbs.csl.xml
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
<info>
<title>URBS Journal Style (based on American Psychological Association 5th Edition)</title>
<id>http://www.zotero.org/styles/urbs</id>
<link href="http://www.zotero.org/styles/urbs" rel="self"/>
<link href="http://rdc.libguides.com/content.php?pid=63487" rel="documentation"/>
<author>
<name>Simon Kornblith</name>
<email>simon@simonster.com</email>
@ccamara
ccamara / .inputrc.sh
Last active Aug 29, 2015 — forked from rodrigoaguilera/gist:dc3c6d7e1c035e2b45e0
rename file to .inputrc and place it into home folder.
View .inputrc.sh
# 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
@ccamara
ccamara / mmenu-responsive.js
Last active Aug 29, 2015
Insert an external library to your drupal7 theme #mmenu
View mmenu-responsive.js
// We should add our js definition into our theme's js folder.
/**
* @file
* A JavaScript file for the Main Menu Responsive behaviour.
*/
(function ($, Drupal, window, document, undefined) {
"use strict";
// Reset ww value.
@ccamara
ccamara / travis.yml
Created Dec 21, 2014
Have Travis CI Install Drupal. Source http://dropbucket.org/node/1761 #CI
View travis.yml
language: php
php:
- 5.3
- 5.4
- 5.5
- hhvm
matrix:
allow-failures:
@ccamara
ccamara / behat-step-defintion.yml
Created Dec 3, 2014
Behat available step definitions with drupal extension Behat available step definitions with drupal extension
View behat-step-defintion.yml
Behat available step definitions with drupal extension
Given /^(?:that I|I) am at "(?P[^"]*)"$/
- Visit a given path, and additionally check for HTTP response code 200.
# FeatureContext::assertAtPath()
When /^I visit "(?P[^"]*)"$/
# FeatureContext::assertVisit()
When /^I click "(?P<link>[^"]*)"$/
View gist:4767058111607d8ee5f7
#!/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
You can’t perform that action at this time.