Skip to content

Instantly share code, notes, and snippets.

View idan's full-sized avatar
💫
Prototypin'

Idan Gazit idan

💫
Prototypin'
View GitHub Profile
@idan
idan / auth.py
Created November 17, 2011 12:20
auth.py
# -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
@idan
idan / SofleKeyboard.kbd.json
Last active November 23, 2023 22:19 — forked from mattfoster/SofleKeyboard.kbd.json
SofleKeyboard
[
{
"backcolor": "#ffffff",
"name": "SofleKeyboard",
"author": "Josef Adamcik",
"switchMount": "cherry"
},
[
{
"y": 0.2,
@idan
idan / router.ts
Last active May 20, 2023 18:00
basic router in typescript
export type Route = {
method: "*" | "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | "CONNECT" | "TRACE"
path: string
regexp: RegExp
handler: (request: Request, route: MatchedRoute) => Promise<Response>
}
export type MatchedRoute = Route & {
url: URL
}
@idan
idan / breeze.dtsi
Last active September 17, 2022 19:38
My ZMK Breeze Keymap
/*
* Copyright (c) 2022 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/matrix_transform.h>
/ {
chosen {
import './style.scss'
import React, { PropTypes } from 'react'
export default class {{ componentName }} extends React.Component {
static propTypes = {
};
static defaultProps = {
};
@idan
idan / gfmtest.md
Created July 19, 2012 10:07
Github-Flavored Markdown Test

La di dah.

This sentence has a_long_var_with_underscores and stuff.

def foo():
    """This is a fenced code block"""
    pass
@idan
idan / next_planning.md
Created March 21, 2022 06:36
Next Planning
@idan
idan / branchclean.fish
Created September 18, 2021 18:54
A fish function which deletes all branches not called main or master
function branchclean
# delete branches that are not called 'main' or 'master'
# Invoke with -r to also delete the branches on the origin remote
# WARNING — this doesn't check if the branches are merged.
argparse 'r/remote' -- $argv
for b in (git branch | grep -v "^\*\?\s\+\(master\|main\)\$" | string trim);
git branch --delete $b;
if test -n "$_flag_r"
git push -d origin $b
@idan
idan / flat.md
Last active May 4, 2021 15:53
Flat Writeup Draft

Wandering the halls of the Internet today, it's hard to miss a certain kind of discourse on data. Big data, bigger data, biggest data. A million rows aren't cool. You know what's cool? A billion rows. Distributed data systems that slip the surly bonds of any one machine. Techniques for sampling and transforming data while it moves. Strategies for contending with a deluge of events from chatty devices. Directing those data tributaries into undifferentiated data lakes so that we may pose different queries onto the data someday. It has become almost impossible to talk about this stuff without abusing metaphors way past their safe design limits.

As a developer, all those bits occupying the proverbial lake/warehouse/refinery are as immediately useful as a grape seed is to a winery. Locality of data isn't some abstract concept when you're trying to build things on top of that data — it's the leading term of developer experiences. If I have the data, I can load it, and get to work. If I don't have the data, then

@idan
idan / gist:3135754
Created July 18, 2012 11:50
A Sample Post

Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.