Skip to content

Instantly share code, notes, and snippets.

View snodnipper's full-sized avatar
🚀

Ollie Snowden snodnipper

🚀
  • Earth
View GitHub Profile
@jsdevtom
jsdevtom / frontend-ws-connection.ts
Last active July 26, 2024 16:21
kubernetes-ingress websockets with nodejs
export const ws = webSocket<WebsocketMessage>(`wss://${location.hostname}:${location.protocol === 'https:' ? 443 : 80}/ws/`);
export const wsObserver = ws
.pipe(
retryWhen(errors =>
errors.pipe(
delay(1000)
)
)
);
public class MainActivity extends AppCompatActivity {
MyService mService;
Boolean mIsBound;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@pramsey
pramsey / ccog-readinglist.md
Last active September 3, 2021 00:30
Canadian Council on Geomatics Reading List
@schoenobates
schoenobates / osgb.go
Created May 15, 2015 15:17
Using Golang with Proj4 to convert between OSGB and WGS84 (both to and from)
package main
/*
#cgo LDFLAGS: -lproj
#include <string.h>
#include <proj_api.h>
*/
import "C"
import (
"fmt"
@nickbutcher
nickbutcher / 1 search_bar.xml
Last active March 26, 2022 10:03
Demonstrating morphing a search icon into a search field. To do this we use an AnimatedVectorDrawable (https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html) made up of two paths. The first is the search icon (as a single line) the second is the horizontal bar. We then animate the 'trimPathStart' property …
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@polbins
polbins / README.md
Last active February 29, 2024 09:58
Simple RecyclerView Divider

Simple RecyclerView Divider

Simple Horizontal Divider Item Decoration for RecyclerView

    mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
            getApplicationContext()
    	));

NOTE: Add item decoration prior to setting the adapter

@itzg
itzg / build.gradle
Last active January 16, 2022 10:03
If you have one application jar with several main entry point classes, you can have Gradle produce a wrapper script for as many of those as you need.
apply plugin: 'groovy'
apply plugin: 'application'
startScripts.deleteAllActions()
jar {
manifest {
// Make sure the app's jar can be used with a simple -cp
attributes 'Class-Path': configurations.runtime.collect { "${it.getName()}" }.join(' ')
}
@benbalter
benbalter / geojson-conversion.sh
Last active April 23, 2024 13:16
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"
}
@mranney
mranney / emoji_sad.txt
Created January 30, 2012 23:05
Why we can't process Emoji anymore
From: Chris DeSalvo <chris.desalvo@voxer.com>
Subject: Why we can't process Emoji anymore
Date: Thu, 12 Jan 2012 18:49:20 -0800
Message-Id: <AE459007-DF2E-4E41-B7A4-FA5C2A83025F@voxer.com>
--Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8