Skip to content

Instantly share code, notes, and snippets.

View bdecarne's full-sized avatar

Blaise de Carné bdecarne

View GitHub Profile
@bdecarne
bdecarne / geojson-conversion.sh
Created October 22, 2018 14:45 — forked from benbalter/geojson-conversion.sh
Bulk convert shapefiles to geojson using ogr2ogr
# Bulk convert shapefiles to geojson using ogr2ogr
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/
# Note: Assumes you're in a folder with one or more zip files containing shape files
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere)
#geojson conversion
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}
@bdecarne
bdecarne / 0_reuse_code.js
Created January 18, 2016 16:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
parameters
--level=psr2 --verbose fix $FileDir$/$FileName$
working directory
$ProjectFileDir$
@bdecarne
bdecarne / post-receive
Last active August 29, 2015 14:17 — forked from zamicol/post-receive
#!/bin/sh
#Put this script into <gitProject>/hooks/post-receive on the production server
#Make sure this script has execute permissions (chmod +x post-receive)
#You can create a group (like "git"), make it owner of this file, and add
#every user that needs to push to the that group.
echo 'start repo to prod'
'use strict';
// A decorator to override uiSref to trigger state change on touchstart if the element does not have disable-fastclick attribute
// It also logs the time between state changes
angular.module('app')
.config(function ($provide) {
$provide.decorator('uiSrefDirective', function ($delegate) {
var originalUiSref, originalUiSrefLink;
originalUiSref = $delegate[0];
originalUiSrefLink = originalUiSref.link;
<?php
namespace HelloWorld;
use InvalidArgumentException;
/**
* This class is somewhere in your library
* @Entity
* @Table(name="users")
*/
var gulp = require('gulp');
var gutil = require('gulp-util');
var sass = require('gulp-sass');
var lr = require('tiny-lr');
var http = require('http');
var path = require('path');
var ecstatic = require('ecstatic');
var tlr = lr();
var livereload = function (evt, filepath) {
tlr.changed({
<?php
class DefaultController extends Controller
{
/**
* Dashboard page.
* @Permissions(perm="dashboard_view")
* @Route("/", name="ITEDashboardBundle_index")
* @Template()
* @return array
@bdecarne
bdecarne / template.php
Last active December 17, 2015 00:19 — forked from lsolesen/template.php
/**
* Implements hook_menu_local_task()
*
* @param array $variables
*
* return string with html
*/
function mytheme_menu_local_task($variables) {
$link = $variables['element']['#link'];
// remove the view link when viewing the node