Skip to content

Instantly share code, notes, and snippets.

View srcrip's full-sized avatar
🔮
typescript is best script

Andrew Stewart srcrip

🔮
typescript is best script
View GitHub Profile
@srcrip
srcrip / flask_starter.py
Created September 28, 2016 01:38
Boilerplate for new flask apps
from flask import Flask, render_template
app = Flask(__name__)
@app.route('/')
def index():
return render_template('index.html')
if __name__ == "__main__":
app.run()
@srcrip
srcrip / __init__.py
Created March 2, 2017 03:59
PyQt Starter
import sys
from PyQt5 import QtCore, QtGui, QtWidgets
from design import Ui_MainWindow
class App(Ui_MainWindow):
def __init__(self, MainWindow):
Ui_MainWindow.__init__(self)
self.setupUi(MainWindow)
# Connect a widget
@srcrip
srcrip / windows_is_so_much_fun.txt
Created October 6, 2017 23:12
Getting bcrypt gem working on Windows
> stop the rails server.
gem uninstall bcrypt
> select option 3.
gem uninstall bcrypt-ruby
> select option 3.
gem install bcrypt --platform=ruby
> in gemfile add:
gem 'bcrypt', platforms: :ruby
> then run:
bundle install
def self.color_test
ANSI.clear
ANSI.home
w, h = ANSI.size
str = ""
(0..w - 1).each do |x|
(0..h - 1).each do |y|
r = y
g = x
b = 75 + (y/2)
@srcrip
srcrip / config.fish
Created November 26, 2017 19:38
Edit command line in Fish
# thanks to github.com/oh-my-fish/theme-budspencer
# Set the tmp file
set -g tmpcmdline '/tmp/'(echo %self)'_cmdline.fish'
function edit_commandline -d 'Open current command line with your editor'
commandline > $tmpcmdline
eval $EDITOR $tmpcmdline
set -l IFS ''
if [ -s $tmpcmdline ]
#!/bin/bash
wget https://raw.githubusercontent.com/thestinger/termite/master/termite.terminfo
tic -x termite.terminfo
sudo apt-get install vim
curl http://j.mp/spf13-vim3 -L -o - | sh
@srcrip
srcrip / SingletonScriptableObject.cs
Created June 2, 2018 00:43 — forked from dvddarias/SingletonScriptableObject.cs
Better Unity Singleton Class
/************************************************************
* Better Singleton by David Darias
* Use as you like - credit where due would be appreciated :D
* Licence: WTFPL V2, Dec 2014
* Tested on Unity v5.6.0 (should work on earlier versions)
* 03/02/2017 - v1.1
* **********************************************************/
using System;
using UnityEngine;

Mirth Server Setup

First create ec2 Ubuntu instance. This can be 14.04 now on MirthConnect 3.2 and above. Hurray!

Great thanks for the original guide: https://gist.github.com/jgautsch/9157402

# Update Ubuntu
sudo aptitude update

# Safe upgrade of Ubuntu
sudo aptitude safe-upgrade

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@srcrip
srcrip / modeline.el
Last active November 6, 2018 23:05
Simple Emacs modeline that isn't quite so ugly as the default, but not too bloated like many modeline-specific packages.
;; modeline
(setq modeline/show-minor-modes t)
(defun modeline/toggle-minor-modes ()
"Toggle modeline/show-minor-modes between t and nil."
(interactive)
(setq modeline/show-minor-modes (not modeline/show-minor-modes)))
(defun shorten-directory (dir max-length)
"Show up to `MAX-LENGTH' characters of a directory name `DIR'."
(let ((path (reverse (split-string (abbreviate-file-name dir) "/")))