Skip to content

Instantly share code, notes, and snippets.

View wolfeidau's full-sized avatar
🐺
Building data science projects

Mark Wolfe wolfeidau

🐺
Building data science projects
View GitHub Profile
@jcloutz
jcloutz / .golang-example-gitlab-ci.yml
Last active December 6, 2022 11:20
Example Gitlab CI setup for Go using the official golang docker image
image: golang:1.7
stages:
- build
- test
before_script:
- go get github.com/tools/godep
- cp -r /builds/user /go/src/github.com/user/
- cd /go/src/github.com/user/repo
@sapessi
sapessi / README.md
Last active September 17, 2021 21:32
continuous deployment of Golang Gin application in AWS Lambda and Amazon API Gateway with CodePipeline/CodeBuild

You can use CodePipeline and CodeBuild to create a continuous deployment/integration pipeline for serverless applications build on AWS Lambda and Amazon API Gateway. This sample application is written in Go with the Gin framework and uses the eawsy API Gateway proxy shim: https://github.com/eawsy/aws-lambda-go-net

We initially detailed our methodology in this blog post: https://aws.amazon.com/blogs/compute/continuous-deployment-for-serverless-applications/

We have used the shim technology created by eawsy to run Golang applications inside AWS Lambda (https://github.com/eawsy/aws-lambda-go-shim) and created a container that can be used with CodeBuild as part of our original pipeline template.

The container is available on DockerHub and is called sapessi/aws-lambda-go18-codebuild:latest. To use this container, simply change the Image property of the CodeBuild project environment.

The pipeline template, sample app, buildspec and SAM files are attached to this gist.

@jonhoo
jonhoo / README.md
Last active July 19, 2021 10:49
Distributed RWMutex in Go
@joho
joho / buildbox_cloudwatch.sh
Created November 11, 2014 22:28
Script for publishing buildbox build wait times as an AWS cloudwatch metric
#!/bin/bash
#
# Publishes CloudWatch metrics about Buildbox queue length
set -e
API='https://api.buildbox.io'
BUILDS_ROUTE='v1/accounts/ACCOUNT_NAME/projects/PROJECT_NAME/builds'
# Determines whether a binary exists on the current $PATH
@wapa5pow
wapa5pow / gist:51eb79cf3b258a71e0934bfcb1fee463
Created August 15, 2016 05:25
Try to update ca for Amazon Linux
[root@ip-10-0-11-111 anchors]# curl -o /etc/pki/ca-trust/source/anchors/GTEGlRoot.crt https://www.cybertrust.ne.jp/sureserver/download/root_ca/GTEGlRoot.txt
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 890 100 890 0 0 6885 0 --:--:-- --:--:-- --:--:-- 6899
[root@ip-10-0-11-111 anchors]# ls
GTEGlRoot.crt
[root@ip-10-0-11-111 anchors]# update-ca-trust
p11-kit: duplicate 'GTE CyberTrust Global Root' certificate found in: ca-bundle.legacy.crt
p11-kit: duplicate 'GTE CyberTrust Global Root' certificate found in: ca-bundle.legacy.crt
p11-kit: duplicate 'GTE CyberTrust Global Root' certificate found in: ca-bundle.legacy.crt
@andif888
andif888 / playbook.yml
Created April 13, 2019 04:17
Ansible Playbook for Ubuntu Desktop minimal
---
- hosts: localhost
tasks:
- name: Add Apt-Keys
apt_key:
url: '{{item.name}}'
state: present
with_items:

How to combine AWS Elastic Beanstalk, Docker and AWS CloudFormation

Introduction

This text explains how to create and deploy a Docker-based AWS Elastic Beanstalk site and how to control it using CloudFormation.

Please find the CloudFormation template at the end of this Gist.

We assume that you are familiar with AWS ElasticBeanstalk, AWS CloudFormation and Docker.

@dmorgantini
dmorgantini / AddNumbersService.java
Created August 13, 2012 14:37
Use SOAP with dropwizard
package com.example.helloworld.resources;
import javax.jws.WebMethod;
@javax.jws.WebService(
name = "AddNumbersPortType",
serviceName = "AddNumbersService",
targetNamespace = "http://duke.example.org")
@javax.jws.soap.SOAPBinding(
style = javax.jws.soap.SOAPBinding.Style.DOCUMENT,
@Daniel15
Daniel15 / BaseStore.js
Created May 10, 2015 07:40
Simple Flux
import EventEmitter from 'events';
import Dispatcher from '../dispatcher';
const CHANGE_EVENT = 'change';
export default class BaseStore extends EventEmitter {
constructor() {
super();
this.dispatchToken = Dispatcher.register(this.handleDispatch.bind(this));

build

Clone and build Node for analysis:

$ git clone https://github.com/joyent/node.git
$ cd node
$ export GYP_DEFINES="v8_enable_disassembler=1"
$ ./configure
$ make -j4