Skip to content

Instantly share code, notes, and snippets.

View sabman's full-sized avatar
😀
Building, Shiping, Sharing!

Shoaib Burq sabman

😀
Building, Shiping, Sharing!
View GitHub Profile
@jpatovh
jpatovh / ng-dt
Created January 21, 2014 21:18
Angular directive for Bootstrap3 datetimepicker - http://eonasdan.github.io/bootstrap-datetimepicker/
angular.module('angularApp').
directive('dt', function(){
return {
require: '?ngModel',
restrict: 'A',
link: function ($scope, element, attrs, controller) {
var updateModel, onblur;
if (controller !== null) {
@sweenzor
sweenzor / shapely-demo.ipynb
Last active January 19, 2022 14:45
Shapely ipython notebook example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jopotts
jopotts / default_values.rb
Last active August 13, 2022 16:26
Simple default values on creation of ActiveRecord models
module DefaultValues
def has_default_values(default_values = {})
class_attribute :default_values
self.default_values = default_values
after_initialize :assign_default_values
include InstanceMethods
anonymous
anonymous / overpass.geojson
Created October 21, 2013 20:20
data exported by overpass turbo
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@urschrei
urschrei / basemap_descartes.py
Last active November 6, 2020 02:49
How to plot Shapely Points using Matplotlib, Basemap, and Descartes
"""
required packages:
numpy
matplotlib
basemap: http://matplotlib.org/basemap/users/installing.html
shapely: https://pypi.python.org/pypi/Shapely
descartes: https://pypi.python.org/pypi/descartes
random
@ptrv
ptrv / spatialite_example.go
Last active September 8, 2022 02:48
SpatiaLite example in Go
package main
import (
"database/sql"
"github.com/mattn/go-sqlite3"
"log"
"os"
)
func runQuery(db *sql.DB, query string) {
@mwotton
mwotton / stupid axe ad
Created August 3, 2013 23:45
whee, i made their pointless C compile!
typedef struct {
int girlfriend;
} holder;
typedef struct {
holder a;
} toplevel;
typedef struct {
int this;
@tyrasd
tyrasd / README.md
Last active May 9, 2022 18:08
This is how I've visualized OpenStreetMap's node density.
  1. download the source data

     wget http://fred.dev.openstreetmap.org/density/tiles.13
     wget http://fred.dev.openstreetmap.org/density/tiles.16
    
  2. convert to simple, gnuplot-readable text format

     sed 's/\([0-9]*\) z=\([0-9]*\) x=\([0-9]*\) y=\([0-9]*\)/\3 \4 \1/' < tiles.13 > tiles.13.txt
     sed 's/\([0-9]*\) z=\([0-9]*\) x=\([0-9]*\) y=\([0-9]*\)/\3 \4 \1/' < tiles.16 > tiles.16.txt
    
@jwlawrence
jwlawrence / maintenance.html
Last active December 16, 2015 10:59
Temporary maintenance page
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>Down For Maintenance</title>
<style>
body { background: #fff; font-family: Helvetica,Arial,sans-serif; margin: 0; padding: 0; }
img { border: 0; }
.wrapper { width: 500px; margin: 0 auto; }
@cspanring
cspanring / geojson-goes-ember.js
Last active December 14, 2015 16:19
Dabbling with GeoJSON and ember.js
// The GeoJSON object
//
// {
// "type": "FeatureCollection",
// "features": [
// {
// "type": "Feature",
// "geometry": {
// "type": "Point",
// "coordinates": [42.3875, -71.1]