Skip to content

Instantly share code, notes, and snippets.

View sanathpathiraja's full-sized avatar

Sanath Pathiraja sanathpathiraja

  • Crystal Martin Ceylon (pvt) Ltd
  • Sri Lanka
View GitHub Profile
/*
Solution for HackerRank > Algorithms > Warmup > Compare the Triplets
https://www.hackerrank.com/challenges/compare-the-triplets
*/
(function solve(a0, a1, a2, b0, b1, b2) {
var aa = [a0, a1, a2];
var bb = [b0, b1, b2];
var a = 0;
var b = 0;
@sanathpathiraja
sanathpathiraja / index.html
Created December 8, 2017 11:14
Page loader
<div id="overlay"></div>
<div id="loader"></div> <img src="https://source.unsplash.com/category/nature/500x500"> <img src="https://source.unsplash.com/category/buildings/500x500"> <img src="https://source.unsplash.com/category/food/500x500"> <img src="https://source.unsplash.com/category/people/500x500"> <img src="https://source.unsplash.com/category/technology/500x500"> <img src="https://source.unsplash.com/category/objects/500x500"> <img src="https://source.unsplash.com/category/nature/500x500"> <img src="https://source.unsplash.com/category/buildings/500x500"> <img src="https://source.unsplash.com/category/food/500x500"> <img src="https://source.unsplash.com/category/people/500x500"> <img src="https://source.unsplash.com/category/technology/500x500">
@teocomi
teocomi / oauth2-restsharp.cs
Last active March 6, 2023 10:33
OAuth2 C# RestSharp
string url = "https://myurl.com";
string client_id = "client_id";
string client_secret = "client_secret";
//request token
var restclient = new RestClient(url);
RestRequest request = new RestRequest("request/oauth") {Method = Method.POST};
request.AddHeader("Accept", "application/json");
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddParameter("client_id", client_id);
request.AddParameter("client_secret", client_secret);