Skip to content

Instantly share code, notes, and snippets.

View jwebbintx's full-sized avatar

James Webb jwebbintx

  • Unity Technologies
  • Austin, TX
View GitHub Profile
@galusben
galusben / hoseSlack.sh
Last active March 14, 2018 03:09
Example using Bintray Firehose API with Slack
# Connect to the event notification stream
./jfrog bt st <bintray-org> --user=<bintray-username> --key=<bintray-api-key> --include="download" |
while read line
do
# Extract the path from the whole event response
path=$(echo $line | jq .path -r)
curl <slack-webhook-url> -H"Content-Type:application/json" --data "{\"text\":\"File Downloaded: $path\"}"
done
@ProbablyRusty
ProbablyRusty / aws-windows-zerotier-demo.tf
Last active February 21, 2024 00:00
Example of using Terraform to automate ZeroTier installation and network joins for Windows EC2 instances
# I recently needed to automate the process of spinning up Windows EC2 instances
# in AWS, installing ZeroTier, and then joining them to a ZeroTier network. I
# used Terraform to do this. This example might help others. If you provide an
# existing subnet, security group, ZeroTier network ID, and a few other details
# via Terraform variables, this template will create one demo Windows instance
# in AWS, install ZeroTier, and join the instance to the specified ZeroTier
# network.
variable "aws_region" {
description = "AWS Region where this instance will be deployed (ie: us-east-1)"
@nfarina
nfarina / mock-storage.js
Last active November 23, 2023 15:50
Mock Google Cloud Storage for JS
//
// Quick & Dirty Google Cloud Storage emulator for tests. Requires
// `stream-buffers` from npm. Use it like this:
//
// `new MockStorage().bucket('my-bucket').file('my_file').createWriteStream()`
//
class MockStorage {
buckets: {[name: string]: MockBucket};
@sapher
sapher / template.json
Last active June 3, 2019 04:50
Packer.io template file for RancherOS
{
"variables": {
"ros_version" : "v0.5.0",
"iso_md5" : "467caa8394684ba54e8731aed8480652",
"vm_name" : "rancher_image"
},
"builders": [
{
"type": "vmware-iso",
"iso_url": "https://releases.rancher.com/os/{{ user `ros_version` }}/rancheros.iso",
@DaveWoodCom
DaveWoodCom / fixXcode6OnElCapitan.sh
Last active September 8, 2023 21:02
Script to fix Xcode 6.x so that it will run on El Capitan
#!/bin/bash
## Copyright (C) 2015 Cerebral Gardens http://www.cerebralgardens.com/
##
## Permission is hereby granted, free of charge, to any person obtaining a copy of this
## software and associated documentation files (the "Software"), to deal in the Software
## without restriction, including without limitation the rights to use, copy, modify,
## merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
## permit persons to whom the Software is furnished to do so, subject to the following
## conditions:
@lamw
lamw / gist:487c9ecb2dc7d043eec8
Last active October 30, 2022 06:21
Automate silent installation of VMware Tools for Mac OS X
#!/bin/bash
# 1 = VMware Tools ISO is mounted from vSphere
# 2 = Download VMware Tools (assumes you can connect to internet)
INSTALL_METHOD=2
# Thanks to Rich Trouton for tip on Tools being available online
VMWARE_TOOLS_DOWNLOAD_URL=http://softwareupdate.vmware.com/cds/vmw-desktop/fusion/7.1.2/2779224/packages/com.vmware.fusion.tools.darwin.zip.tar
# DO NOT MODIFY BEYOND HERE #
@squarism
squarism / elk_stack_install.md
Last active October 22, 2023 12:25
Quick Elasticsearch / Kibana / Logstash (ELK stack) Install (for your local mac dev box)

Elasticsearch / Kibana / Logstash Quick Install

Instructions for getting an ELK stack set up quick on Mac. Paths are opinionated. You'll have to infer and change. Sorry mate. 🍰

Install Homebrew if not already. You probably have. If not, you should.

brew install elasticsearch nginx

do yourself a favor and get a better services command than launchctl

@luqmaan
luqmaan / CapMetro_API_Wishlist.md
Last active February 13, 2018 04:22
CapMetro API Wishlist

Support CORS. Allow the API to be accessed through webapps without having to setup a proxy server in between.

Add documentation! Sneaking around the API and looking at the the trip planner code is not optimal.

Build an API the right way. Provide API keys so you can throttle requests and make sure things aren't getting slow.

More frequent polling of the bus locations. Right now it takes 30-90 seconds for bus locations to update. This sucks for users.

When will the 803 info be added to the GTFS database?

@cjus
cjus / sample-nginx.conf
Last active July 12, 2023 14:59
AngularJS Nginx and html5Mode
server {
server_name yoursite.com;
root /usr/share/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
@calebwoods
calebwoods / nginx.conf
Created May 10, 2014 20:18
Sample Nginx config for deployment of Angular.js app
server { listen 80;
server_name example.com;
access_log /var/log/example.com/nginx.access.log;
error_log /var/log/example.com/nginx.error.log;
root /var/www/apps/example.com/public;
charset utf-8;
location / {
rewrite ^ https://$host$request_uri? permanent;
}