Skip to content

Instantly share code, notes, and snippets.

View lanekatris's full-sized avatar

Lane Katris lanekatris

View GitHub Profile
@gbaman
gbaman / graphql_example.py
Created November 1, 2017 00:18
An example on using the Github GraphQL API with Python 3
# An example to get the remaining rate limit using the Github GraphQL API.
import requests
headers = {"Authorization": "Bearer YOUR API KEY"}
def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section.
request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers)
if request.status_code == 200:
@magnetikonline
magnetikonline / README.md
Last active October 10, 2024 17:31
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script which will:

  • Iterate all commits made within a Git repository.
@matt-bailey
matt-bailey / package.json
Created May 8, 2015 12:32
Bare bones package.json file
{
"name": "[project-name]",
"description": "[project-description]",
"version": "1.0.0"
}
@mitchwongho
mitchwongho / Docker
Last active September 23, 2024 12:09
Docker 'run' command to start an interactive BaSH session
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
@afreeland
afreeland / gist:4484102
Last active December 10, 2015 19:48
JavaScript: Get Angle By Two Vectors On Coordinate Plan
/**
* Defines an x,y coordinate
* @param {float} x coordinate
* @param {float} y coordinate
*/
function Point (x, y) {
this.x = x;
this.y = y;
}