Skip to content

Instantly share code, notes, and snippets.

View OmarIthawi's full-sized avatar

Omar Al-Ithawi OmarIthawi

  • ZeitLabs.com
View GitHub Profile
@OmarIthawi
OmarIthawi / simplest_python_testing.py
Created April 4, 2024 12:47
Python testing tutorial
"""
Run with either:
- $ python testing_example.py
OR
- $ pytest -v testing_example.py
@OmarIthawi
OmarIthawi / CHANGELOG of Git sparse-checkout changelog from 3.34.0 to 2.40.0
Last active April 11, 2023 00:43
Git sparse-checkout changelog from 3.34.0 to 2.40.0
Git sparse checkout changed some breaking code changes:
2.34.0.txt: * In cone mode, the sparse-index code path learned to remove ignored
2.34.0.txt: files (like build artifacts) outside the sparse cone, allowing the
2.34.0.txt: entire directory outside the sparse cone to be removed, which is
2.34.0.txt: especially useful when the sparse patterns change.
2.34.0.txt- * "git add", "git mv", and "git rm" have been adjusted to avoid
2.34.0.txt: updating paths outside of the sparse-checkout definition unless
2.34.0.txt: the user specifies a "--sparse" option.
"""
min. Requirements:
- We an API client that fetches configs from the API.
- We need it to cache the result via Django cache, and use cache when possible.
adl. Requirements:
- Allow using the client in packages (such CLI) that Django isn't installed.
"""
## v1. Hard Django Depdencency in a single class
@OmarIthawi
OmarIthawi / 0_Tahoe_Juniper_Mergebook.md
Last active November 13, 2020 14:03
Merge conflicts and resolution note book for Juniper Tahoe.
@OmarIthawi
OmarIthawi / keybase.md
Created September 27, 2017 07:56
Proving my GitHub identity to Keybase.io

Keybase proof

I hereby claim:

  • I am omarithawi on github.
  • I am omarithawi (https://keybase.io/omarithawi) on keybase.
  • I have a public key ASAKGVmuHTauWkpW82IdX6zDdR4OZ4rwW6UWOXWVEL7gwQo

To claim this, I am signing this object:

@OmarIthawi
OmarIthawi / Distance.java
Created December 5, 2011 10:45
Haversine Java Implementation in Solr, vs PHP implementation
import java.util.Scanner;
public class Distance {
private double latCenterRad;
private double lonCenterRad;
private double latCenterRad_cos;
public Distance(double latCenter, double lonCenter) {
this.latCenterRad = latCenter * DistanceUtils.DEGREES_TO_RADIANS;