Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Neil mneil

View GitHub Profile
@mneil
mneil / setup-mutato.sh
Created Apr 2, 2020
Mutato Environment Setup
View setup-mutato.sh
#!/bin/bash
cd /path/to/your/github/repo
echo "GITHUB_TOKEN=$GITHUB_TOKEN" > mutato.env
aws-vault exec <profile name> -- env | grep AWS_ >> mutato.env
docker run -it --rm --env-file mutato.env -v `pwd`:/project stelligent/mutato bootstrap
docker run -it --rm --env-file mutato.env -v `pwd`:/project stelligent/mutato deploy
@mneil
mneil / Dockerfile
Created Apr 19, 2019
MCUXpress Docker Build
View Dockerfile
FROM ubuntu:16.04
LABEL Description="Image for buiding arm project with mcuxpresso"
WORKDIR /work
ENV SDK_VERSION 2.5.0
ENV IDE_VERSION 10.3.0_2200
COPY ./mcuxpressoide-${IDE_VERSION}.x86_64.deb.bin /work
COPY ./SDK_${SDK_VERSION}_LPC54018-IoT-Module.zip /work
@mneil
mneil / Upstart Twistd Server
Last active May 8, 2017
Upstart Twistd Server
View Upstart Twistd Server
# UPSTART SCRIPT
# /etc/init/{taskname}.conf
# This task is run on startup to run miniweb which is a tiny static server
description "Run the miniweb web form"
start on (filesystem and net-device-up IFACE!=lo)
task
exec sudo twistd -no web --path /path/to/web/dir --port="tcp:8000"
@mneil
mneil / server.py
Created May 3, 2017
Python Static Server w/SSL
View server.py
import BaseHTTPServer, SimpleHTTPServer
import ssl, os, sys
port = int(sys.argv[1]) if len(sys.argv) > 1 else 4443
cwd = os.path.dirname(os.path.realpath(__file__))
pem = os.path.join( cwd, 'mycert.pem' )
os.chdir(cwd)
class MyHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def end_headers(self):
@mneil
mneil / Basic Upstart
Created Apr 4, 2017
Upstart script to launch miniweb static server at boot time and serve a folder.
View Basic Upstart
# UPSTART SCRIPT
# /etc/init/{taskname}.conf
# This task is run on startup to run miniweb which is a tiny static server
description "Run the miniweb web form"
start on (filesystem and net-device-up IFACE!=lo)
task
exec /usr/bin/miniweb -p 8000 -r /home/helios/Documents/ticket-config
@mneil
mneil / kioskmode.bat
Created Feb 15, 2016
Kill chrome and open a new page in kiosk mode
View kioskmode.bat
taskkill /F /IM Chrome.exe /T
### Open a local index.html file in the same directory as this batch file
# start chrome --kiosk --profile-directory=Default --app="%~dp0/index.html"
### Open a website URL
start chrome --kiosk --profile-directory=Default --app="http://google.com"
@mneil
mneil / gist:11c9d355ea8c39e186ba
Last active Aug 29, 2015
Muut Ruby Federated Identites Example
View gist:11c9d355ea8c39e186ba
@user = {
:user => {
:id => 'johndoe', # required
:displayname => 'John Doe', # required
:email => 'john.doe@gmail.com',
:avatar => '//gravatar.com/avatar/e5fb96fe7ec4ac3d4fa675422f8d1fb9',
:is_admin => true
}
}
require 'digest/sha1'
@mneil
mneil / gist:044bf07cc4fa9b237ac7
Created Feb 13, 2015
Muut modify display time for FF and Chrome
View gist:044bf07cc4fa9b237ac7
(function(){
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
function time(target){
target.innerHTML = target.time;
}
moot("format", function(body, post) {
var $ = jQuery;
var $post = $(body).parents('.m-post')[0];
@mneil
mneil / mootloader.php
Created Feb 4, 2015
moot joomla loader muut patch
View mootloader.php
<?php
/*
* MootLoader
* @version $Id: mootloader.php 1.0.1
* @date 04/15/2013
* @sikumbang @erwinschro @mneil michael@muut.com
* @site http://www.templateplazza.com
* @package Joomla 2.5.x
* @license GNU General Public License version 2 or later; see LICENSE.txt
*
@mneil
mneil / gist:58555011ed3ab3b8a0c7
Last active Mar 16, 2016
Muut Google Sites Widget
View gist:58555011ed3ab3b8a0c7
<Module>
<ModulePrefs title="Preferences for __UP_forum__" height="400"/>
<UserPref name="myforum" display_name="Muut Playground" default_value="playground" datatype="string"/>
<Content type="html">
<![CDATA[
<div id="muut-gadget"> <script type="text/javascript">
var prefs = new gadgets.Prefs();
var forum = prefs.getString("myforum");
document.write('<a class="muut" href="https://muut.com/i/'+forum+'">'+forum+'</a>');
</script>
You can’t perform that action at this time.