Skip to content

Instantly share code, notes, and snippets.

View jinahadam's full-sized avatar
😲

Jinah Adam jinahadam

😲
View GitHub Profile
@jinahadam
jinahadam / setup-ssl.md
Created November 28, 2022 11:11 — forked from pedrouid/setup-ssl.md
Setup SSL with NGINX reverse proxy

Get a Free SSL Certificate With Let’s Encrypt

Let’s Encrypt is a free, automated, and open Certificate Authority.

  1. Install tools for using the Let's Encrypt certificates using Certbot
  sudo apt-get update \
  sudo apt-get install software-properties-common
@jinahadam
jinahadam / Firecloud Nearby GeoQuery
Created November 28, 2018 14:41 — forked from zirinisp/Firecloud Nearby GeoQuery
Firecloud Nearby GeoQuery
import CoreLocation
extension CLLocationCoordinate2D {
func boundingBox(radius: CLLocationDistance) -> (max: CLLocationCoordinate2D, min: CLLocationCoordinate2D) {
// 0.0000089982311916 ~= 1m
let offset = 0.0000089982311916 * radius
let latMax = self.latitude + offset
let latMin = self.latitude - offset
// 1 degree of longitude = 111km only at equator
# Add this to your .oh-my-zsh theme if you're using those, or directly to your zsh theme :)
# Colors vary depending on time lapsed.
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
ZSH_THEME_GIT_TIME_SHORT_COMMIT_MEDIUM="%{$fg[yellow]%}"
ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG="%{$fg[red]%}"
ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[cyan]%}"
#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
git_custom_status() {
@jinahadam
jinahadam / example.js
Created May 17, 2011 16:50 — forked from madrobby/README.md
Luhn10 algorithm
var validCreditCard = function(a,b,c,d,e){b=a.length-1,e=0,d=~~a[b];while(b--){e++,c=~~a[b],d+=e%2?[0,2,4,6,8,1,3,5,7,9][c]:c};return(d%10==0)};
validCreditCard('378282246310005'); //=> true
validCreditCard('378282246310006'); //=> false
/*
VALID TEST NUMBERS
378282246310005 371449635398431 378734493671000
30569309025904 38520000023237 6011111111111117