Skip to content

Instantly share code, notes, and snippets.

View andrewmcnamara's full-sized avatar

Andrew McNamara andrewmcnamara

  • Sydney, Australia
View GitHub Profile
<div id="root"></div>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script type="text/babel">
class Greeting extends React.Component {
render() {
return (<p>Hello world</p>);
}
}
@andrewmcnamara
andrewmcnamara / Dockerfile
Last active May 6, 2019 01:51
Docker - Ruby
FROM alpine:3.7
RUN apk add --update --no-cache --virtual ruby-build linux-headers wget
RUN apk add --update --no-cache postgresql-dev build-base tzdata git nodejs \
git libc-dev libxml2-dev libxslt-dev postgresql-client \
g++ make gcc zlib-dev gdbm-dev readline-dev ruby-dev
RUN wget https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.6.tar.bz2 \
&& mkdir -p /usr/src/ruby \
&& tar -xjvf ruby-2.3.6.tar.bz2 -C /usr/src/ruby --strip-components=1 \
@andrewmcnamara
andrewmcnamara / docker-compose.yml
Created November 26, 2017 21:00
postgres and elasticsearch on docker
version: "3"
services:
postgres:
image: postgres:9.6.3
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
environment:
class MyClass
def self.[](attrib)
self
end
end
class MyOtherClass < MyClass[:attrib]
end
docker run --name="elasticsearch" -p 9200:9200 -e ES_JAVA_OPTS='-Xms512m -Xmx512m' -v esdata:/usr/share/elasticsearch/data -d elasticsearch
docker run --name postgres -p 5432:5432 -e POSTGRES_USER=amcnamara -v pgdata:/var/lib/postgresql/data postgres:9.6.3 -d

Keybase proof

I hereby claim:

  • I am andrewmcnamara on github.
  • I am andrewmcnamara (https://keybase.io/andrewmcnamara) on keybase.
  • I have a public key ASCuZYiGla0AN19xhqsG5Vxst7kMqIpYJA9Mp2-pbPgNGwo

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.box {
border: 1px solid black;
width: 5px;
@andrewmcnamara
andrewmcnamara / Fastfile
Created June 20, 2016 20:38 — forked from kennydee/Fastfile
Fastfile for staging environment with Appetize.io on React Native (iOs & Android), with statuses update on Github Enterprise
require 'httparty'
fastlane_version "1.95.0"
default_platform :ios
before_all do
# put here your token and iOs scheme app
ENV["GITHUB_TOKEN"] = "---"
ENV["APPETIZE_TOKEN"] = "---"
ENV["APP_IOS_SCHEME"] = "---"
@andrewmcnamara
andrewmcnamara / index.html
Last active June 6, 2016 04:22
Run React/Redux with in browser transform. Based on http://codetheory.in/babel-6-and-above-in-browser/
<!DOCTYPE html>
<html>
<head>
<title>React Example</title>
<meta name="description" content="A React example made with HyperDev">
<link id="favicon" rel="icon" href="https://hyperweb.space/favicon.ico" type="image/x-icon">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/style.css">