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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: frontend | |
labels: | |
name: frontend | |
spec: | |
type: LoadBalancer | |
ports: | |
- name: http |
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
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: sitemap | |
spec: | |
template: | |
spec: | |
restartPolicy: OnFailure | |
containers: | |
- name: sitemap |
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
sitemapindex = '<?xml version="1.0" encoding="UTF-8"?>\n' | |
sitemapindex = sitemapindex + '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n' | |
for file in glob.glob('*.xml'): | |
sitemapindex = sitemapindex + '<sitemap>\n' | |
sitemapindex = sitemapindex + ' <loc>http://inkl.in/sitemaps/' + file + '</loc>\n' | |
sitemapindex = sitemapindex + '</sitemap>\n' | |
sitemapindex = sitemapindex + '</sitemapindex>' |
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
for x in range(int(data["block_number"]), 1, -1): | |
line = line + "<url>\n" | |
line = line + "<loc>http://inkl.in/"+str(x)+ "</loc>\n" | |
line = line + "<changefreq>never</changefreq>" | |
line = line + "</url>\n" | |
counter=counter+1 | |
if counter == 50000: | |
counter = 1 | |
print("Writing " + str(filename)) |
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
import urllib, json | |
url = "http://api.inkl.in/api/inklin/live/0" | |
response = urllib.urlopen(url) | |
data = json.loads(response.read()) | |
print "Starting from " + str(data["block_number"]) |
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
# build environment | |
FROM node as builder | |
ARG REACT_APP_SHA | |
ENV REACT_APP_SHA=${REACT_APP_SHA} | |
RUN mkdir /usr/src/app | |
WORKDIR /usr/src/app | |
ENV PATH /usr/src/app/node_modules/.bin:$PATH | |
COPY package.json /usr/src/app/package.json | |
RUN npm install -g -s --no-progress yarn |
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
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: rendertron | |
spec: | |
selector: | |
app: rendertron | |
ports: | |
- name: rendertron | |
protocol: TCP |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: rendertron | |
labels: | |
app: rendertron | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: |
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
FROM node | |
RUN apt-get update && \ | |
apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \ | |
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \ | |
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \ | |
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ | |
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget | |
RUN git clone https://github.com/GoogleChrome/rendertron.git | |
WORKDIR rendertron |
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/local/bin/ruby | |
# Used to export Blocks from a Web3 compatible endpoint | |
# I use: | |
# parity --geth --jsonrpc-server-threads=4 --mode=offline -d /data/io.parity.ethereum/ --cache-size 65536 | |
require 'web3/eth' | |
require 'mongoid' | |
force_sync = ARGV[0] |