Skip to content

Instantly share code, notes, and snippets.

View mrloop's full-sized avatar

Ewan McDougall mrloop

View GitHub Profile
@mrloop
mrloop / create-new-app.sh
Created May 1, 2023 13:09
Quick full-stack app deployment using AWS and Ember.js
pnpm create sst ember-sst-example
@mrloop
mrloop / lambda.sh
Created March 26, 2023 20:42 — forked from luads/lambda.sh
Replay lambda from DLQ message
function replay_lambda() {
local profile=$1
local fn=$2
sqs_message="initialising..."
dlq_arn=$(aws --profile=$profile lambda get-function --function-name "$fn" | jq -r '.Configuration.DeadLetterConfig.TargetArn')
dlq=$(aws --profile=$profile sqs get-queue-url --queue-name "$(echo ${dlq_arn##*:})" --output=text)
while [ ! -z "$sqs_message" ]; do
.App-header {
padding: 1em;
background-color: #282c34;
min-height: 200px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
"scripts": {
"start:firefox": "web-ext-react run | xargs -L1 web-ext run -u http://www.example.org/ -s",
"start:chrome": "web-ext-react run | xargs -L1 web-ext run -u http://www.example.org/ -t chromium -s",
}
{
"description": "Bundle ReactJS as web extension",
"manifest_version": 2,
"name": "web-ext-react-hello",
"version": "1.0",
"homepage_url": "https://github.com/mrloop/web-ext-react-hello",
"icons": {
"192": "logo192.png"
},
if (document.isBrowserAction) {
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById("root")
)
}
yarn add -D web-ext web-ext-react
npx create-react-app web-ext-react-hello
cd web-ext-react-hello
npm start
@mrloop
mrloop / adguardhome
Created September 2, 2019 20:50
FreeBSD AdGuardHome process management /etc/rc.d/adguardhome
#!/bin/sh
#
# PROVIDE: AdGuardHome
# REQUIRE: networking
# KEYWORK:
#
# see https://redbyte.eu/en/blog/supervised-freebsd-init-script-for-go-deamon/
# remember to add `adguardhome_enable='YES` to `/etc/rc.conf`
. /etc/rc.subr
@mrloop
mrloop / part.js
Created March 12, 2016 09:38
Simple minimal version of https://github.com/mrloop/vehicle-app, run via node `node part.js`
var part = function (spec) {
var that = {
getName: function (){
return spec.name
},
toString: function () {
var str = this.getName() + '\n' + this.getCents() + '\n';
return str + this.map(spec.parts, function(part){
return part.toString();