Skip to content

Instantly share code, notes, and snippets.

Michael Cole MichaelJCole

Block or report user

Report or block MichaelJCole

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MichaelJCole
MichaelJCole / scale.sh
Created Jan 7, 2016
Script to scale PDF's
View scale.sh
#!/bin/bash
# pdfScale.sh
#
# Scale PDF to specified percentage of original size.
# Ref: http://ma.juii.net/blog/scale-page-content-of-pdf-files.
SCALE=0.95 # scaling factor (0.95 = 95%, e.g.)
# Validate args.
View spec.json
{
"swagger": "2.0",
"info": {
"title": "test API",
"description": "test Swagger 2.0 API specification. This API spec can be used for integrating your Form.io project into non-HTML5 programs like \"native\" phone apps, \"legacy\" and \"enterprise\" systems, embedded \"Internet of Things\" applications (IoT), and other programming languages. Note: The URL's below are configured for your specific project and form.",
"termsOfService": "http://form.io/terms/",
"contact": {
"name": "Form.io Support",
"url": "http://help.form.io/",
"email": "support@form.io"
@MichaelJCole
MichaelJCole / gist:aa4895dc6cf260c9445f
Created May 30, 2015
New /platforms/browser/cordova/run
View gist:aa4895dc6cf260c9445f
#!/usr/bin/env node
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
@MichaelJCole
MichaelJCole / nginx.conf.template
Last active Oct 9, 2016
Dokku CORS SSL nginx template
View nginx.conf.template
## This is/was the template from /root/dokku/plugins/nginx-vhosts/templates/nginx.ssl.conf
## See the CORS section added below
server {
listen [::]:80;
listen 80;
server_name $NOSSL_SERVER_NAME;
return 301 https://$SSL_SERVER_NAME\$request_uri;
}
server {
View pdfScale.sh
#!/bin/bash
# pdfScale.sh
#
# Scale PDF to specified percentage of original size.
# Ref: http://ma.juii.net/blog/scale-page-content-of-pdf-files.
echo "This script doesn't handle files with spaces in them."
SCALE=0.95 # scaling factor (0.95 = 95%, e.g.)
@MichaelJCole
MichaelJCole / git push production master
Created May 11, 2014
MEAN.JS Heroku Deployment: git push production master
View git push production master
☀ git push production master master
Initializing repository, done.
Counting objects: 2797, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (1390/1390), done.
Writing objects: 100% (2797/2797), 1.43 MiB | 161.00 KiB/s, done.
Total 2797 (delta 1313), reused 2793 (delta 1311)
-----> Deleting 1 files matching .slugignore patterns.
-----> Node.js app detected
@MichaelJCole
MichaelJCole / heroku.sh
Last active Aug 29, 2015
MEAN.JS setup summary
View heroku.sh
#!/bin/bash
## Setup your MEAN.JS and Heroku dev/stage/prod environment
# http://blog.powma.com/fast-cheap-and-mean-devstageprod-server-setup-with-heroku/
# Config for your project:
YOURAPPNAME=YOUR_APP_NAME
## Create Production server
You can’t perform that action at this time.