Skip to content

Instantly share code, notes, and snippets.

Avatar

Rob Aldred raldred

View GitHub Profile
@raldred
raldred / heroku-check-app-stacks.rb
Created Feb 26, 2020
Quick script to check the stack of all our apps
View heroku-check-app-stacks.rb
#!/usr/bin/env ruby
team = ARGV[0]
raise 'Specify team' unless team
check_app = Proc.new do |app|
info = %x{heroku apps:info -a #{app}}
stack = info.match(/Stack:\s+(.*)/)[1].strip
app = "#{app}:"
puts "#{app.ljust(30)} #{stack}"
View gist:098801f9ea47bd37c64652af2ef35baf
-bash: have: command not found
-bash: /usr/local/etc/bash_completion.d/ant: line 45: syntax error in conditional expression: unexpected token `('
-bash: /usr/local/etc/bash_completion.d/ant: line 45: syntax error near `-@(?'
-bash: /usr/local/etc/bash_completion.d/ant: line 45: ` if [[ "${COMP_WORDS[i]}" == -@(?(build)file|f) ]]; then'
-bash: have: command not found
-bash: /usr/local/etc/bash_completion.d/apt: line 12: syntax error in conditional expression: unexpected token `('
-bash: /usr/local/etc/bash_completion.d/apt: line 12: syntax error near `@(i'
-bash: /usr/local/etc/bash_completion.d/apt: line 12: ` if [[ ${COMP_WORDS[i]} == @(install|remove|autoremove|purge|source|build-dep) ]]; then'
-bash: /usr/local/etc/bash_completion.d/apt-build: line 12: syntax error in conditional expression: unexpected token `('
-bash: /usr/local/etc/bash_completion.d/apt-build: line 12: syntax error near `@(i'
@raldred
raldred / tasks.json
Created Apr 20, 2017
Example vscode task config for running Ruby RSpec
View tasks.json
{
"version": "0.1.0",
"tasks":[
{
"command": "/Users/robaldred/.rvm/wrappers/ruby-2.4.0/bundle",
"args": [
"exec", "rspec", "--format", "progress", "--color"
],
"isTestCommand": true,
"echoCommand": true,
@raldred
raldred / location.js
Last active Nov 5, 2017
Location Component for react native with workaround for Android issue https://github.com/facebook/react-native/issues/7495
View location.js
export default class Location extends Component {
constructor(props) {
super(props);
this._locationReceived = false;
this._locationWatchID = null;
};
componentDidMount() {
@raldred
raldred / wbus_sim900.ino
Last active Oct 11, 2016
Arduino WBus & SIM900
View wbus_sim900.ino
//hacked together by bo herrmannsen 2016
#include "wbus.h"
#include "SIM900.h"
#include <SoftwareSerial.h>
#include "sms.h"
SMSGSM sms;
char number[]="3921234567";
@raldred
raldred / ReplacementBuildPostprocessor.cs
Created May 25, 2016 — forked from cojo/ReplacementBuildPostprocessor.cs
Unity 5.3 PostprocessBuildPlayer Trigger Replacement
View ReplacementBuildPostprocessor.cs
using System;
using System.IO;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
@raldred
raldred / iTween.cs
Last active Dec 5, 2017
Unity iTween with support for uGUI Image & Text requires 5+
View iTween.cs
// Copyright (c) 2011 Bob Berkebile (pixelplacment)
// Please direct any bugs/comments/suggestions to http://pixelplacement.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:
//
@raldred
raldred / gist:6fb93d969aaede7ffe41
Last active Aug 14, 2020
Getting RTL SDR and dump1090 running on OSX El Capitan
View gist:6fb93d969aaede7ffe41
# =================================================================================================
# RTL SDR & Dump1090 installation for OSX El Capitan
# =================================================================================================
# This is written as a guide for those wanting to install RTL SDR and Dump1090 for OSX El Capitan
# It may work on other versions of OSX
# I am using a R820T from Jetvision.de
# http://bit.ly/1QynTts - without antenna
# http://bit.ly/1O60IUV - with small indoor antenna
# -------------------------------------------------------------------------------------------------
# To follow this guide you will need to use the Terminal app
@raldred
raldred / user.js
Last active Sep 1, 2015
Digitally Imported Responsive Fix
View user.js
// ==UserScript==
// @name Digitally Imported Unresponsive Fix
// @namespace http://robaldred.co.uk/
// @version 0.1
// @description Watches for the annoying unresponsive popup that's presented and resumes playback.
// @match http://www.di.fm/*
// @copyright 2015+, Rob Aldred
// ==/UserScript==
;(function(window) {
View gist:ad6de0f76a5095b21fda
root@OpenWrt:~# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
delegate_input all -- anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
delegate_forward all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
You can’t perform that action at this time.