Skip to content

Instantly share code, notes, and snippets.

View powerc9000's full-sized avatar
🧺

Clay Murray powerc9000

🧺
View GitHub Profile
@powerc9000
powerc9000 / automating_lambda_deployment.md
Last active January 8, 2020 12:49
Automating Lambda Deployment With Travis-CI

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": [
@powerc9000
powerc9000 / post_a_day.md
Last active February 7, 2017 05:54
Post a Day

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.

@powerc9000
powerc9000 / translations.md
Last active November 27, 2018 15:57
Translations with Firebase

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"
}
@powerc9000
powerc9000 / post.md
Last active March 23, 2024 05:48
Making Your Own 2.5D Renderer Thing In C++ For Fun

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.

@powerc9000
powerc9000 / hoc.js
Last active January 16, 2019 18:44
HOC and injection
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();