Skip to content

Instantly share code, notes, and snippets.

View MikeDabrowski's full-sized avatar

MikeDabrowski MikeDabrowski

View GitHub Profile
@MikeDabrowski
MikeDabrowski / calculator.js
Last active October 30, 2024 08:33
Austrian ticket
const fs = require('fs');
// Function to convert degrees to radians
function toRadians(degrees) {
return degrees * (Math.PI / 180);
}
// Function to calculate the Haversine distance between two points in decimal degrees
function haversineDistance(lat1, lon1, lat2, lon2) {
const R = 6371e3; // Earth's radius in meters
@MikeDabrowski
MikeDabrowski / Explanation.md
Last active November 3, 2024 11:24
Git/ssh multiple accounts
  1. Create ssh keys for each account
  2. add them with ssh-add
  3. create .gitconfigs for each account
[user]
	name = MikeDabrowski-Work
	email = [email protected]
	signingkey = /Users/mike/.ssh/work.pub
[gpg]
	format = ssh

Keybase proof

I hereby claim:

  • I am mikedabrowski on github.
  • I am mighty_ahti (https://keybase.io/mighty_ahti) on keybase.
  • I have a public key ASCD0W3D7QgnhkK1NGqrQCaAm8UGbtlxy0k_hmPIOW7LYQo

To claim this, I am signing this object:

@MikeDabrowski
MikeDabrowski / role.model.ts
Last active March 18, 2018 08:37
Sequelize m2m
import * as Sequelize from 'sequelize';
import { sequelize } from '../instances/sequelize';
export const Role = sequelize.define('roles', {
id: {
type: Sequelize.INTEGER,
autoIncrement: true,
primaryKey: true
},
roleName: {