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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags --> | |
<title>Bootstrap 3 Starter Template (CDN)</title> | |
<!-- Bootstrap --> |
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
# This file is a template, and might need editing before it works on your project. | |
# Official docker image. | |
image: docker:latest | |
services: | |
- docker:dind | |
build: | |
stage: build | |
script: | |
# $DOCKERHUB_USER is NOT your email address, it's your username! | |
- docker login -u "$DOCKERHUB_USER" -p "$DOCKERHUB_PASSWORD" |
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 folders below will be cached between builds | |
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache | |
cache: | |
paths: | |
- node_modules/ | |
- _site # or other arbitrary directory | |
stages: | |
- build | |
- test |
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
var json = null; | |
$.ajax({ | |
'global': false, | |
'url': '//api.blockthem.io/v1/blacklist.json', | |
'dataType': "json", | |
'success': function (data) { | |
json = data; | |
} | |
}); |
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
#!/usr/bin/python | |
import urllib2 | |
import json | |
import re | |
def isDomainBlockedLive( domain, jsonFile ): | |
domain = re.sub(r'http(s?):\/\/', '', domain) | |
domain = re.sub(r'^www\.', '', domain) | |
domain = re.sub(r'\/$', '', domain) | |
headers = { 'User-Agent' : 'Mozilla/5.0' } |
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
#!/usr/bin/python | |
import urllib2 | |
import json | |
import re | |
def isDomainBlockedLive( domain, jsonFile ): | |
domain = re.sub(r'http(s?):\/\/', '', domain) | |
domain = re.sub(r'^www\.', '', domain) | |
domain = re.sub(r'\/$', '', domain) | |
headers = { 'User-Agent' : 'Mozilla/5.0' } |
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
#!/usr/bin/ruby | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
def isDomainBlockedLive(domain, jsonFile) | |
domain = domain.sub(/http(s?):\/\//, '').sub(/^www\./, '').sub(/\/$/, '') | |
list = JSON.parse(Net::HTTP.get(URI.parse(jsonFile))) | |
return list.include? domain |
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
<?php | |
function isDomainBlocked($domain, $jsonFile) { | |
$domain = preg_replace('/^http(s?)\:\/\//', '', $domain); | |
$domain = preg_replace('/^www\./', '', $domain); | |
$domain = preg_replace('/\/$/', '', $domain); | |
$list = json_decode(file_get_contents($jsonFile), true); | |
return in_array($domain, $list); | |
} | |
// Example: Live |