Skip to content

Instantly share code, notes, and snippets.

@kylebarron
kylebarron / convert.py
Last active April 24, 2024 06:38
preprocessing script for geoparquet on the web demo (https://observablehq.com/@kylebarron/geoparquet-on-the-web)
import geopandas as gpd
import pandas as pd
import pyarrow as pa
import pyarrow.feather as feather
import pyarrow.parquet as pq
import pygeos
import pyogrio
# https://ookla-open-data.s3.us-west-2.amazonaws.com/parquet/performance/type=mobile/year=2019/quarter=1/2019-01-01_performance_mobile_tiles.parquet
@Kreijstal
Kreijstal / PonyTown.js
Last active April 24, 2024 06:37
Hacks for not popular glorified chat called ponytown
//>implying whoever reads it can understand this
//Minified code from Rainb Essentials.
var genParser=function(e,t,n){function r(e,t){var n,r,i,a;return e?e instanceof RegExp?(i=new RegExp,i.compile("^(?:"+e.source+")",(e.multiline?"m":"")+(e.eturnignoreCase?"i":"")),n=i.exec(o.substr(s)),r=n&&n[0],null===r?null:(s+=r.length,r)):"string"==typeof e?e===o.substr(s,e.length)?(s+=e.length,e):null:(r=e.type,a=c[r],n=a(e,t),a?n:null):null}function i(e){return o=e,s=0,a.unknown(r(u))}var o,s,a=t,u={type:"type",is:n},c={expression:function(e){var t,n,i,o,s,a,u,c,l,p,f,h,d,g={type:"alternate",contains:[e.contains]},b={type:"alternate",contains:[]},y={type:"alternate",contains:[]},m=[],v=[];if(c=e.operators){for(t=0,i=c.length;i>t;t++)for(n=0,o=c[t].tokens.length;o>n;n++)a=c[t].tokens[n],e.whiteSpaceIgnore?"string"==typeof a?b.contains.push(new RegExp("\\s*(?:"+a.replace(/([-+\\?.!$^&*(){}[\]])/g,"\\$1")+")\\s*")):a instanceof RegExp?b.contains.push(new RegExp("\\s*(?:"+a.source+")\\s*",(a.multiline?"m":"")+(a.ignoreCa
@rowland007
rowland007 / UpstreamRepos.md
Created April 19, 2019 09:47
Describes how to add an upstream remote repo to your forked/cloned repo to get the latest updates.

Keep a Downstream git Repository Current with Upstream Repository Changes

A downstream repository (aka a “fork”) maintainer commonly needs to stay current with upstream work (aka "original"). The case is development continues on the upstream repo while you work on your own origin fork. You want to fetch the upstream changes and apply them to your origin so you don't make conflicts.

image cannot be displayed

The following steps allow you to achieve this on the command line in a local git repository.

Add the Remote Upstream Repository

@tykurtz
tykurtz / grokking_to_leetcode.md
Last active April 24, 2024 06:35
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@JemCdo
JemCdo / columns_cheat_sheet.md
Created September 25, 2019 16:10 — forked from alphaolomi/columns_cheat_sheet.md
Laravel Migration Cheat Sheet

Columns

Available Column Types

The schema builder contains a variety of column types that you may specify when building your tables:

The schema builder contains a variety of column types that you may specify when building your tables:

Command` Description
$table->bigIncrements('id'); Auto-incrementing UNSIGNED BIGINT (primary key) equivalent column.
$table->bigInteger('votes'); BIGINT equivalent column.
@hn270591
hn270591 / PanZoomImageView.swift
Created March 18, 2024 15:46
Scrollable Zoom UIImageView
class PanZoomImageView: UIScrollView {
var image: UIImage? {
get { return imageView.image }
set { imageView.image = newValue }
}
private let imageView = UIImageView()
override init(frame: CGRect) {
super.init(frame: frame)
commonInit()
@JunkFood02
JunkFood02 / Motion.kt
Last active April 24, 2024 06:31
A music player demo made with Jetpack Compose animation APIs, including shared element transition, list animations, animated content, etc.
package com.example.compose_debug
import androidx.compose.animation.EnterTransition
import androidx.compose.animation.ExitTransition
import androidx.compose.animation.core.CubicBezierEasing
import androidx.compose.animation.core.Easing
import androidx.compose.animation.core.FastOutLinearInEasing
import androidx.compose.animation.core.FastOutSlowInEasing
import androidx.compose.animation.core.LinearOutSlowInEasing
import androidx.compose.animation.core.PathEasing
@nepsilon
nepsilon / git-change-commit-messages.md
Last active April 24, 2024 06:30
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@khannasarthak
khannasarthak / InterviewRoadmap.md
Last active April 24, 2024 06:29
My Interview Study roadmap

Coding Interview University

I originally created this as a short to-do list of study topics for becoming a software engineer, but it grew to the large list you see today. After going through this study plan, I got hired as a Software Development Engineer at Amazon! You probably won't have to study as much as I did. Anyway, everything you need is here.

The items listed here will prepare you well for in an interview at just about any software company, including the giants: Amazon, Facebook, Google or Microsoft. >