This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use anyhow::{Context, Result}; | |
use chrono::{DateTime, FixedOffset}; | |
use std::{cmp::Ordering, collections::HashMap}; | |
pub type LatLng = (f32, f32); | |
type LatLngDelta = (u8, u8); | |
type Minutes = u32; | |
pub fn distance_meters(start: LatLng, end: LatLng) -> f32 { | |
let r = 6371000.; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Based on https://gist.github.com/hobbes3/fbc0c591d49178a7995a */ | |
/* BACKGROUND */ | |
body, | |
.dashboard-body, | |
.footer, | |
.dashboard-panel, | |
.dashboard-cell { | |
background: #333333 !important; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Background */ | |
body, #event-pane { | |
background: #333333; | |
color: white; | |
} | |
li.button, input.server, div.add.button { | |
background-color: #8BC34A !important; | |
border: 0px solid green !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns inline-spec-macro.clj | |
(:require [clojure.spec.alpha :as s] | |
[orchestra.spec.test :as st])) | |
(clojure.core/defn ^:private in? | |
[coll elm] | |
(some #(= elm %) coll)) | |
(clojure.core/defn ^:private indices | |
[pred coll] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Update and install some binaries | |
sudo yum -y update | |
sudo yum -y install zsh curl wget git nano unzip | |
# Use temporary directory | |
mkdir ~/tmp | |
cd ~/tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function prompt { | |
printf "Do you want to delete $1? (y/N)? " | |
read -r answer | |
if echo "$answer" | grep -iq "^y" ;then | |
git branch -D $1 | |
fi | |
} |