Skip to content

Instantly share code, notes, and snippets.

View rgrannell1's full-sized avatar
💻

R*Grannell rgrannell1

💻
View GitHub Profile
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@castlese
castlese / Taxi Fare Calculator
Last active March 17, 2021 00:12
Dublin taxi fare calculator written in java Input parameters: Journey distance (in km) Journey duration (in minutes, taken from Google Maps directions API) Current time (in milliseconds) Output parameters: An array of strings giving the following information: Minimum journey time (same as Journey duration input parameter) Minimum journey fare Ma…
import java.util.Calendar;
public class TaxiFare {
private static final String DECIMAL_POINT = ".";
private static final String EMPTY_STRING = "";
/** DECLARATION OF CONSTANTS */
/** Standard Rate - between 8am and 8pm Mon - Sat excl Public Holidays */
private static final int MIN_KM = 1;
public static final int STD_INIT = 410; /** Initial Fare - includes 1km or 170 secs */
@rxaviers
rxaviers / gist:7360908
Last active July 26, 2024 03:07
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@bryangoodrich
bryangoodrich / LambdaLists.r
Last active July 28, 2020 13:19
List Out Of Lambda [in R] An adaptation of Steve Losh's JavaScript exploration[1] with a hat tip to Hadley Wickham's Advanced R Programming[2] that led me there. References [1] http://stevelosh.com/blog/2013/03/list-out-of-lambda/ [2] http://adv-r.had.co.nz/
# Created by Bryan Goodrich
# Version 0.1
#
# Title: List Out Of Lambda [in R]
#
# An adaptation of Steve Losh's JavaScript exploration[1] with a hat tip to
# Hadley Wickham's Advanced R Programming[2] that led me there.
#
# References
# [1] http://stevelosh.com/blog/2013/03/list-out-of-lambda/
@hlorand
hlorand / vidstab_ffmpeg.md
Last active June 22, 2024 19:07
Video stabilization using VidStab and FFMPEG

Video stabilization using VidStab and FFMPEG

** Step 1 **

Install ffmpeg with the vidstab plugin.

@fnky
fnky / ANSI.md
Last active July 26, 2024 02:14
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
// ==UserScript==
// @name @chaoticvibing Twitter Blue Nerd - twitter.com
// @namespace Violentmonkey Scripts
// @match *://*.twitter.com/*
// @match *://*.x.com/*
// @grant none
// @version 1.9.2
// @author @chaoticvibing - GH @busybox11
// @description 11/9/2022, 11:45:28 PM
// @updateURL https://gist.githubusercontent.com/busybox11/53c76f57a577a47a19fab649a76f18e3/raw