insane.pink
๐ณ website for insane.jpg siege youtube videos.
๐ Production | ๐พ Development | ๐บ Video Material | ๐ Support | ๐จ Issues | ๐ Help |
---|---|---|---|---|---|
insane.pw | insane.pink | youtube.com/insanj | patreon.com/insanj | github.com/insanj | contact |
Google Cloud | Github Pages | Youtube | Patreon | Github |
Table of Contents
Usage
- install with
bundle install
(install Bundler) - serve with
npm start
(bundle exec jekyll serve
) to see your development site - build with
npm run build
(bundle exec jekyll build
) to get a production ready site - sync with
npm run youtube
(node insane_sync.js
) to create a new post from the latest insane.jpg youtube video - deploy with
jekyll build --destination docs && gcloud app deploy
which both generates a static site for Github Pages and Google Cloud
NOTE: insane.pw uses the barber-jekyll theme
Components
๐ Steam API Integration
Setup
- register a new api key with the steam dev community
- lookup your steam username and get the identifier in the steamID64 format (mine is
76561198017375926
). steamidfinder.com works well for this - build a url using the following format:
http://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=<API_KEY>&steamids=<STEAM_ID>
- parse the JSON response to extract the important info displayed below:
{"response":
{"players":
[{
"lastlogoff":1541446073,
"profileurl":"https://steamcommunity.com/id/insanj/",
"avatarfull":"https://steamcdn-a.akamaihd.net/steamcommunity/public/images/avatars/8f/8f80c9dae4338b1c83ed5e4b3a0da663e0d51b14_full.jpg",
"personastate":1,
"timecreated":1259700378,
"gameextrainfo":"Tom Clancy's Rainbow Six Siege",
"gameid":"359550",
"loccountrycode":"US"
}]
}
}
- ๐ render and ship it! great documentation is here for all the API metadata responses
Setup
Google Cloud
๐ฎ Jekyll-App-Engine
NOTE: ๐ the current deployment uses this plugin! check out the app.yaml and _config.yml, which both include very important details
๐ Custom (Docker) Environment App
- install docker on your local machine in order to test the custom environment
- ensure the docker service is running (may require running the following command on Linux/Ubuntu subsystem:
sudo nohup docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock &
) - create a
Dockerfile
that will run automatically once yourapp.yaml
hasenv: custom
:
# NODEJS
FROM gcr.io/google_appengine/nodejs
COPY . /app/
RUN npm install --unsafe-perm || \
((if [ -f npm-debug.log ]; then \
cat npm-debug.log; \
fi) && false)
# RUBY
FROM gcr.io/google_appengine/ruby
COPY . /app/
RUN bundle install
RUN bundle exec jekyll serve --host=216.239.36.21
๐ Ruby App
- clone this repository (or create your own jekyll-based repo)
- create a new project in the Google Cloud Console and a new Ruby app in the App Engine section
- add a new custom domain (if desired) in the settings area
- update the advanced dns records of your domain name (which can be bought through Google, Namecheap, etc) to add the A and CNAME records, which look something like this:
A @ 216.239.32.21
AAAA @ 2001:4860:4802:32::15
CNAME www ghs.googlehosted.com
- install the gcloud sdk on your local machine and run
gcloud init
to setup a new configuration for the project you've just made - run
gcloud app deploy
which will upload and serve your files (make sure the_config.yml
andapp.yaml
are setup to your liking). the default config looks like this:
runtime: ruby
env: flex
entrypoint: bundle exec jekyll serve
NOTE: certain config values are extremely important to hosting a jekyll server, such as the 3 listed above in the
app.yaml
, and theexcludes: [vendor]
line in the_config.yml
, the crux of the issue reported here
- enable websocket use by running the following command:
gcloud compute firewall-rules create default-allow-jekyll --allow tcp:4000 --target-tags jekyll --description "allow jekyll traffic on port 4000"
๐ง Bucket
- clone this repository (or create your own jekyll-based repo)
- create a new project in the Google Cloud Console and Create a Bucket under the Storage section in the sidebar
- install the gcloud sdk on your local machine and run
gcloud auth login
- run
jekyll build && gsutil -m rsync -d -r _site gs://<BUCKET_URL>.com
, which will upload and serve your files (make sure the_config.yml
andapp.yaml
are setup to your liking) - select the bucket from the main Bucket Browser menu and change its Permissions (sometimes in the Info Panel on the right)
- expose bucket perhaps through the App Engine Application Settings, Default Cloud Storage Bucket area, or using instructions here
๐ Github Pages
- clone this repository
- either (1) trust github to properly build jekyll based on the existing
_config.yml
or (2) runjekyll build --destination docs
- enable Github Pages in the settings area of your Github repository, and point it to
master
or yourdocs
directory
About
- created by insanj (Julian Weiss)
- licensed under GPL-3.0
- published site copyright 2018
- reach out on youtube