This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parameters | |
--level=psr2 --verbose fix $FileDir$/$FileName$ | |
working directory | |
$ProjectFileDir$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace HelloWorld; | |
use InvalidArgumentException; | |
/** | |
* This class is somewhere in your library | |
* @Entity | |
* @Table(name="users") | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DefaultController extends Controller | |
{ | |
/** | |
* Dashboard page. | |
* @Permissions(perm="dashboard_view") | |
* @Route("/", name="ITEDashboardBundle_index") | |
* @Template() | |
* @return array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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 |