Skip to content

Instantly share code, notes, and snippets.

View brianjp93's full-sized avatar
💭
反重力

Brian Perrett brianjp93

💭
反重力
  • Denver
View GitHub Profile
@pdib
pdib / .ebextensions\deploy.config
Last active April 5, 2022 07:39
Installing node and npm on a Django AWS ElasticBeanstalk
# This specifies the deployment process on AWS ElasticBeanstalk for a Django app using npm and Postgres.
#
# The target environment should have access to a Postgres Database through environment variables.
# The environment can be setup using `eb create --database.engine=postgres`
# The necessary environment variables to access the database will be automatically defined on the
# instances of that environment.
#
# In addition, the target environment should define environment variables (django secret key ...).
# They can be manually defined using the AWS ElasticBeanstalk interface on the web.
# They can also be specified when creating the environment from command line, for example:
@marcg1968
marcg1968 / base36.py
Created August 31, 2015 09:37
Python convert (encode/decode) base 36
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# http://stackoverflow.com/a/1181922
def base36encode(number, alphabet='0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'):
"""Converts an integer to a base36 string."""
if not isinstance(number, (int, long)):
raise TypeError('number must be an integer')
@1lann
1lann / replays.md
Last active April 24, 2023 09:06
Storing and playing back replays in League of Legends

Storing and playing back replays in League of Legends

How it works

When you spectate a game in League of Legends, you tell the client to use a HTTP server, and make HTTP requests to it to retrieve data in chunks which make up a game. But what if you could return back the exact same data at a later time, simulating the spectate but viewing it at anytime? That's the concept behind replays and that's how they work.

There is some behavior in the API which I do not fully understand yet, so there are if statements to catch these edge cases.

Current game information

Before you can even get the game's metadata, you'll need to retrieve necessary information for the game. This call is part of the official Riot Games API.

/observer-mode/rest/consumer/getSpectatorGameInfo/{platformId}/{summonerId}

@levi
levi / riot_esports_api.md
Last active November 8, 2023 16:38
Riot LoL eSports Unofficial API Documentation
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 13, 2024 11:18
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j