Skip to content

Instantly share code, notes, and snippets.

View AndreLobato's full-sized avatar

Andre Lobato AndreLobato

View GitHub Profile
@pkazmierczak
pkazmierczak / asw-csgo.yaml
Last active April 1, 2020 11:18
CounterStrike Global Offensive linux server AWS CF template
---
AWSTemplateFormatVersion: '2010-09-09'
Description: CounterStrike Global Offensive linux server template
Mappings:
AWSRegion2AMI:
eu-central-1:
AMI: ami-26c43149
eu-west-1:
AMI: ami-ed82e39e
Parameters:
@RobertSudwarts
RobertSudwarts / deg_to_cardinal.py
Created June 7, 2015 16:18
[python] degrees to cardinal directions
def degrees_to_cardinal(d):
'''
note: this is highly approximate...
'''
dirs = ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE",
"S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"]
ix = int((d + 11.25)/22.5)
return dirs[ix % 16]