I really hate doing things myself when I can have a computer do it for me.
So In this post I will describe how I automate lambda deployment with travis-ci.
Create a AWS role that has these permissions.
{
"Version": "2012-10-17",
"Statement": [I really hate doing things myself when I can have a computer do it for me.
So In this post I will describe how I automate lambda deployment with travis-ci.
Create a AWS role that has these permissions.
{
"Version": "2012-10-17",
"Statement": [I would like to get better at writing. Expecially technical writing.
Therefore I am making it my goal to create a blog post a day for a month.
Since this is supposed to be a programming blog I will attempt to keep that focus.
Hopefully I can think of something to post everyday.
Onto something programming related.
At my place of work we were doing translations with json files and key value pairs.
eg. en-US.json
{
"this_key": "Translates to this"
}
So I like to program. And I guess I like the idea of making a game. I really haven't finised many. Previously most of my attempts have been in Javacript using canvas I made some library/engine thing even. I mean it isn't very good is it?
Anyway, I think writing low level code makes you cool. And I want to be cool like Casey Muratori or Jonathan Blow I also think old school engines like Build, Doom, or Wolfenstien 3D are cool. Which makes me want to eschew all better ideas and do one similar to those. However, since I don't hate myself completely. I do use SDL for the platform layer.
In the rest of this post I will go over some cool things I think I do.
| const HOC = (Wrapped) => { | |
| return class Dialog extends Component { | |
| state = { | |
| open: false, | |
| text: "" | |
| } | |
| toggle = () => { | |
| this.setState({ | |
| open: !this.state.open | |
| }) |
| <div> | |
| <Translation default="Welcome">homepage_welcome</Translation> | |
| </div> |
| import React, {Component} from "react"; | |
| import {getTranslation} from "./translator"; | |
| class Translate extends Component { | |
| render(){ | |
| const key = children; | |
| const translation = getTranslation(key, this.props.default); | |
| const configUrl = "https://a.dropconfig.com/1291ea92-845b-46a4-a020-74bf0c5e72f4.json" | |
| let translations = null; | |
| async function loadTranslations(lang){ | |
| const req = await fetch(configUrl); | |
| const data = await req.json(); | |
| // We will want a better system to find out the language etc. | |
| // But this will do for now. |
| { | |
| "flags": [ | |
| { | |
| "name": "some_feature", | |
| "enabled": false | |
| } | |
| ] | |
| } |
| const req = await fetch("https://a.dropconfig.com/d21deb7f-f6ad-428d-be4d-c20cbffa2f3d.json"); | |
| const flags = await req.json(); |