This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Limits the no of character in your element. | |
*/ | |
.trim-text { | |
white-space: nowrap; | |
overflow: hidden; | |
text-overflow: ellipsis; | |
max-width: 75ch; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HOC to handle error. | |
function handleError(fn){ | |
return function(...params) { | |
return fn(...params).catch(function (err) { | |
console.error(`Oops! ${err}`); | |
}); | |
} | |
} | |
// Our async function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Response from Hosted Domains API by IPInfo.io | |
{ | |
"domain": "comcast.net", | |
"ip": "69.252.80.75", | |
"asn": "AS7922", | |
"count": 939, | |
"range": "69.240.0.0/12", | |
"domains": [ | |
[ | |
"comcast.net", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Response from Range API agains comcast.net. | |
{ | |
"domain": "comcast.net", | |
"num_ranges": "37330", | |
"ranges": [ | |
"23.24.240.0/29", | |
"23.24.240.64/29", | |
"23.24.240.128/28", | |
"23.24.240.152/29", | |
"23.24.240.168/29", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"domain": "comcast.net", | |
"num_ranges": "37330", | |
"ranges": [ | |
"23.24.240.0/29", | |
"23.24.240.64/29", | |
"23.24.240.128/28", | |
"23.24.240.152/29", | |
"23.24.240.168/29", | |
"23.24.240.192/29", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The response from the ASN API. | |
{ | |
"asn": "AS7922", | |
"name": "Comcast Cable Communications, LLC", | |
"country": "US", | |
"allocated": "1997-02-14", | |
"registry": "arin", | |
"domain": "comcast.net", | |
"num_ips": 71220480, | |
"prefixes": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hitting /batch endpoint with mulitple IP addresses. | |
curl -XPOST -H "Content-Type: application/json" \ | |
--data '["75.72.7.215/company", "8.8.4.4/asn"]' \ | |
ipinfo.io/batch?token=$TOKEN # TOKEN contains your ipinfo token | |
# Response in JSON. | |
{ | |
"75.72.7.215/company": { | |
"name": "Comcast Cable Communications, LLC", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GOPATH=/Users/saqibameen/Code/sa-learn-go/project1/main | |
export GOBIN=$GOPATH/bin | |
PATH=$PATH:$GOPATH:$GOBIN | |
export PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0-modified | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, | |
del, dfn, em, img, ins, kbd, q, s, samp, | |
small, strike, strong, sub, sup, tt, var, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Main CSS | |
* | |
* @author Saqib Ameen | |
*/ | |
/* global box-sizing */ | |
*, | |
*:after, | |
*:before { |