Skip to content

Instantly share code, notes, and snippets.

git submodule deinit <path_to_submodule>
git rm <path_to_submodule>
git commit-m "Removed submodule "
rm -rf .git/modules/<path_to_submodule>
@DavidWells
DavidWells / javascript-proxy-as-rest-client.js
Last active May 12, 2024 14:24
Using a javascript proxy as low code REST client
/* Using a JavaScript proxy for a super low code REST client */
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3
// also see https://github.com/fastify/manifetch
// also see https://github.com/flash-oss/allserver
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const createApi = (url) => {
return new Proxy({}, {
get(target, key) {
@michalczukm
michalczukm / move-exercises-to-ts.sh
Created April 12, 2021 17:07
Moves js exercises files to TS - so now you can do the examples in TS
#!/bin/sh
npm install -D typescript @types/node @types/react @types/react-dom @types/jest
echo "{
"compilerOptions": {
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
@iansu
iansu / README.md
Last active March 1, 2021 08:40
Create React App 4.0 Alpha Testing

Create New App

JavaScript Template

npx create-react-app@next --scripts-version=@next --template=cra-template@next my-js-app

TypeScript Template

npx create-react-app@next --scripts-version=@next --template=typescript@next my-ts-app

@bradtraversy
bradtraversy / myscript.sh
Last active July 16, 2024 10:39
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
anonymous
anonymous / index.html
Created May 12, 2014 01:09
A Pen by Anonasaurus Rex.
<div id="mydiv" class="container">
<h1 style="color:orange">Hello</h1>
<p id="name">My name is Vivian</p>
I like
<ul>
<li class="yes">books</li>
<li>bugs</li>
<li>cats</li>
<li class="no">dogs</li>
</ul>
@sgillies
sgillies / geojson-is-spectacularly-wrong.rst
Last active December 12, 2015 08:39
Candidate talks for http://foss4g-na.org/call-for-presentations/. Comments and forks welcome. I'm also open to co-presenting.

GeoJSON is Spectacularly Wrong

Sean Gillies http://sgillies.net

This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

@semprebon
semprebon / gist:1595446
Created January 11, 2012 16:24
Dynspag Layer
{
"guid": "15fa1134cd6a24a5",
"title": "Hospitals",
"categoryFilter": null,
"url_type": null,
"extent": [ - 170.685669787886, -14.2903264751727, 145.724048653947, 71.2930611100571],
"info_window_filter": null,
"subtitle": "",
"geometry_types": ["point"],
"order": 1,
@spara
spara / create_geo_header_staging_table.sql
Created January 10, 2012 20:27
Create staging table for geo_header data
CREATE TABLE geo_header_staging(data text);
copy geo_header_staging FROM '/path/to/dcgeo2010.sf1' DELIMITER AS '|';
@spara
spara / create_SF1_tables.sql
Created January 10, 2012 20:25
Create 2010 Census SF1 tables
-- drop table data_field_descriptors;
create table data_field_descriptors
(
sort id integer,
segment varchar(4),
table number varchar(12),
field name varchar(510),
field code varchar(20),
decimal integer
);