Skip to content

Instantly share code, notes, and snippets.

View nicklozon's full-sized avatar

Nick Lozon nicklozon

View GitHub Profile
services:
byparr:
image: ghcr.io/thephaseless/byparr:main
ports:
- 8191:8191
<?php
function validateAdyenWebhookHmac($hmacKey, $notificationData) {
// Required fields for HMAC calculation
$fields = [
'amount.value',
'amount.currency',
'eventCode',
'eventDate',
'merchantAccountCode',
# syntax = docker/dockerfile:1
ARG RUBY_VERSION=3.3.4
ARG NODE_VERSION=22.8.0
FROM registry.docker.com/library/ruby:$RUBY_VERSION-slim as base
# Rails app lives here
WORKDIR /rails
# Set production environment
<html>
<head>
<script type="text/javascript" src="chart.umd.js"></script>
</head>
<body>
<div style=""><canvas id="ventcanvas"></canvas></div>
<div style=""><canvas id="cabincanvas"></canvas></div>
<script type="text/javascript">
function createChart() {
--[[
Each time sequencer is called it counts up from 1 to the upper bound, wrapping back to 1 upon reaching the maximum
--]]
function sequencer(maximum)
local i=0
return function() -- the function is returned and not executed here, so whatever operation that receives it will need to invoke it at some point for this code to execute
if i==maximum then
i=0
end
i=i+1
var mapSchema = require('./index.js');
// Basic example
var params = {'noise': 'Meow!'};
var schema = {'makeNoise': function(p) { return p.noise; }};
mapSchema(schema, params, function(ret) {
console.log(ret); //{ makeNoise: 'Meow!' }
});
var _ = require('lodash');
/**
* Takes two objects and a callback. One schema object that contains nested
* objects and functions, the other a paramater object with no constraints. The
* schema object is traversed recursively and functions are evaluated in place
* using the parameter object as the only parameter. The final evaluated object
* is passed to the callback.
* @param {Object} obj
* @param {Object} params
#
# Copyright (c) 2015 Matthew Bentley
#
#
# 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:
'use strict';
var spawn = require('child_process').spawn;
var cpu = require('./available-configs/cpu.json');
// Use Gnu stdbuf to avoid buffering from commands
var child = spawn('stdbuf', ['-oL', 'bash', '-c', cpu.command]);
child.stdout.on('data', function(data) {
process.stdout.write(data);
#!/usr/bin/env python2
import requests
import unicodecsv
from datetime import date
dt = date.today().isoformat()
###########
# Skaters #