Skip to content

Instantly share code, notes, and snippets.

View chill5018's full-sized avatar
⛷️

Colin chill5018

⛷️
View GitHub Profile
@staltz
staltz / introrx.md
Last active April 18, 2024 15:33
The introduction to Reactive Programming you've been missing
@chhabraromit
chhabraromit / SendMail.java
Created January 3, 2015 12:06
Mailgun Example with Jersey 2.x
/*I have tried this with Jersey 2.14 only but should work for Jersey 2.x*/
package com.mail;
import javax.ws.rs.client.Client;
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.client.Entity;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.Form;
import javax.ws.rs.core.MediaType;
@zulhfreelancer
zulhfreelancer / upgrade.md
Last active February 17, 2023 00:42
How to upgrade Heroku Postgres database plan?
  1. Assuming you have multiple Heroku apps and Git remote like so:
development https://git.heroku.com/xxx.git (fetch)
development https://git.heroku.com/xxx.git (push)
origin      git@bitbucket.org:xxx/xxx.git  (fetch)
origin      git@bitbucket.org:xxx/xxx.git  (push)
production  https://git.heroku.com/xxx.git (fetch)
production  https://git.heroku.com/xxx.git (push)
staging https://git.heroku.com/xxx.git (fetch)
@stephan-nordnes-eriksen
stephan-nordnes-eriksen / countryAndLanguageFromIosOrAndroidLocale.js
Last active July 26, 2023 10:26
JavaScript/Node.js Get Country from iOS or Android locale string
/**
* Get the country code (ISO 3166-1 alpha-2) from a valid locale string from Android or iOS.
* Valid locale strings are described here:
* ios: https://developer.apple.com/library/content/documentation/MacOSX/Conceptual/BPInternational/LanguageandLocaleIDs/LanguageandLocaleIDs.html
* android: https://developer.android.com/reference/java/util/Locale.html
*
* Tested with ava.
*
* @param {*string} localeString The locale string from android or ios
*/