Skip to content

Instantly share code, notes, and snippets.

@weedkiller
weedkiller / add-geojson-to-leaflet-map.markdown
Created July 21, 2018 05:47
Add GeoJSON to Leaflet Map

Add GeoJSON to Leaflet Map

A demonstration of how to add geoJSON data to a Leaflet map. The demo uses jQuery's getJSON method and a vanilla XMLHttpRequest.

This demo is for the 1.x release of Leaflet.js.

GeoJSON data is provided by the City of Pittsburgh, Pennsylvania.

A Pen by weedkiller on CodePen.

@weedkiller
weedkiller / index.html
Created July 21, 2018 05:46
side menu for leaflet map, populated with geoJSON
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<script src="//cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<div id="mapwrap">
<div id="toolbar">
<div class="hamburger">
<span>Tour&nbsp;Stops</span>
</div>
@weedkiller
weedkiller / Migration.js
Created March 28, 2018 20:05 — forked from libsteve/Migration.js
A script for migrating the primary domain of a Google Apps account.
// migrate the script executer's primary domain
// domainName - the desired domain to migrate to
function migrateDomain(organizationName, domainName) {
var customerId = 'my_customer';
var customer = AdminDirectory.Customers.get(customerId);
customer.customerDomain = domainName;
customer.postalAddress.organizationName = organizationName;
customer.customerCreationTime = undefined; //
AdminDirectory.Customers.patch(customer, customerId);
using Dimensional.Common;
using Dimensional.Gips.Core.Services;
using Dimensional.Gips.Core.Services.Cube;
namespace Dimensional.Gips.Database.Cube
{
public class AssetsByClientFactBulkInserter : BaseSqlBulkInserter<AssetsByClientFact>
{
private readonly IDatabaseSettings _databaseSettings;
@weedkiller
weedkiller / Top 10,000 Words in English Language
Created February 15, 2018 05:38 — forked from jebcat1982/Top 10,000 Words in English Language
10,000 most commonly used words in the english language. Note that this list is not censored, so if you are to use this as a reference for a profanity-sensitive environment, you may want to filter through it first.
the of and to a in for is on that by this with i you it not or be are from at as your all have new more an was we will home can us about if page my has search free but our one other do no information time they site he up may what which their news out use any there see only so his when contact here business who web also now help get pm view online c e first am been would how were me s services some these click its like service x than find price date back top people had list name just over state year day into email two health n world re next used go b work last most products music buy data make them should product system post her city t add policy number such please available copyright support message after best software then jan good video well d where info rights public books high school through m each links she review years order very privacy book items company r read group sex need many user said de does set under general research university january mail full map reviews program life know games way days man
@weedkiller
weedkiller / GetRecordCountForAllTables.sql
Created February 15, 2018 05:05 — forked from sergiogarciadev/GetRecordCountForAllTables.sql
Get the number of records for each table in the SQL Server database.
DECLARE @sql NVARCHAR(4000)
DECLARE @tableName VARCHAR(255);
CREATE TABLE #DatabaseTables (TableName VARCHAR (255), RecordCount INT);
DECLARE tables_cursor CURSOR FOR
SELECT name FROM sysobjects WHERE xtype = 'U' ORDER BY name
OPEN tables_cursor
@weedkiller
weedkiller / LocalDBHelper.cs
Created February 15, 2018 05:00 — forked from sergiogarciadev/LocalDBHelper.cs
LocalDB Helper to create, drop and check localdb databases.
namespace LocalDBSample
{
using System;
using System.Data.SqlClient;
using System.IO;
using System.Reflection;
public class LocalDBHelper
{
public static string DataDirectory
@weedkiller
weedkiller / Convert_Collations.sql
Created February 15, 2018 04:57 — forked from sergiogarciadev/Convert_Collations.sql
Alter the collation of all columns on a SQL Server database.
DECLARE
@collation_from VARCHAR(100),
@collation_to VARCHAR(100);
-- Define the collations here
SET @collation_from = 'SQL_Latin1_General_CP1_CI_AS'
SET @collation_to = 'Latin1_General_CI_AS'
@weedkiller
weedkiller / connectHTMLelements_SVG.png
Created February 7, 2018 06:39 — forked from alojzije/connectHTMLelements_SVG.png
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png
@weedkiller
weedkiller / EndpointBehavior.cs
Created January 21, 2018 21:46 — forked from nickalbrecht/EndpointBehavior.cs
Series of functions and classes for using SSRS to run reports from inside an ASP.NET Core application
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
internal class ReportingServicesEndpointBehavior : IEndpointBehavior
{
public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters) { }
public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime)
{