Skip to content

Instantly share code, notes, and snippets.

View powerc9000's full-sized avatar
🧺

Clay Murray powerc9000

🧺
View GitHub Profile
/*purpose:simple game about falling
Author:Kaydon Stubbs
Date:
*/
#include<iostream>
#include<time>
#include<stdlib>
using namespace std;
// The OpenGL libraries, make sure to include the GLUT and OpenGL frameworks
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <SDL2/SDL.h>
// This is just an example using basic glut functionality.
// If you want specific Apple functionality, look up AGL
// The OpenGL libraries, make sure to include the GLUT and OpenGL frameworks
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <SDL2/SDL.h>
#include <math.h>
// This is just an example using basic glut functionality.
// If you want specific Apple functionality, look up AGL
float PI = 3.1415;
(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/"))
(package-initialize)
(tool-bar-mode -1)
(require 'evil)
(evil-mode 1)
(setq-default indent-tabs-mode nil)
(global-linum-mode t)
(require 'web-mode)
(setq web-mode-enable-current-column-highlight t)
(aggressive-indent autopair color-theme-sanityinc-tomorrow cyberpunk-theme evil-args evil goto-chg undo-tree fiplr grizzl grizzl helm helm-core async popup async helm-core async hl-sexp icicles indent-guide jsx-mode magit magit-popup dash async git-commit with-editor dash async dash with-editor dash async dash async magit-popup dash async multi-term neotree php-mode popup powerline-evil powerline evil goto-chg undo-tree rainbow-delimiters smart-tab smooth-scroll smooth-scrolling solarized-theme dash sublime-themes undo-tree use-package diminish bind-key web-mode with-editor dash async)
@powerc9000
powerc9000 / post.md
Last active June 27, 2016 16:49
New Blog

New Blog

Making a new blog thing to post my musing on React Native. Using my own home built static site builder.

I write the posts in gists! Then I add the ID to a list and it gets built using a small little nodejs script.

It's neat. Please stay posted for more.

@powerc9000
powerc9000 / post.md
Last active June 27, 2016 05:56
Testing syntax highlighting

This is a test of syntax highlighting

function code(){
  var that = this;
  //Something something
}

code();
@powerc9000
powerc9000 / post.md
Last active August 19, 2018 15:38
Globals In React Native

Recently I ran into a problem in React Native.

I wanted to be able to have more granular control of my build besides React Native's __DEV__.

Our QA people need to have a few tools at their disposal to run the APP vs our live and test servers. I don't want to make them download the project on Github and run it. That would force them onto a mac for iOS builds. I don't want to ship the app with __DEV__ on. It would be quite complex to have them connect to some dev package server to run the app A third option was needed. There should be a __QA__ flag. This way I can release the APP in without __DEV__ but keep some QA features I want. The naive way would be to have something like a globals.js file that you include and edit the file for different releases. eg.

@powerc9000
powerc9000 / creating_ios_archives.md
Created July 19, 2016 06:10
Creating and uploading iOS archives from the command line.

I don't like IDEs. I want to code in my editor and use the command line for everything else. I like the flow better and it feels faster to me.

I also like to have one command to do several things I want to do.

I don't want to open Xcode to create an archive, then open the archive window, then upload the archive to iTunes. It's slow and breaks my flow.

Also, in react native, it's trivial to build Android releases on the command line. I want to create and upload both iOS and android from the command line.

So after hours of searching the internet I found a flow I like for creating and uploading archives for iOS all from the command line

@powerc9000
powerc9000 / lambda_cloudfront.md
Last active January 12, 2017 00:16
Running lambdas as your server with cloudfront.

So recently in my work I have wanted to pre-render some of our pages and then keep the cached version in cloudwatch.

There are a few options in doing this.

You can set up an EC2 instance. Or use ECS.

However, what if you don't want to pay to have and EC2 instance running all the time. You have a budget!

Enter lambdas. AWS lambdas can be created to run based on events. Sadly you can't directly integrate with lambda from cloudwatch (except for lambda@edge but that is a different use case). This isn't too hard AWS even has a nice article on it for us. http://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started.html