Skip to content

Instantly share code, notes, and snippets.

View acquahsamuel's full-sized avatar
🌀
Building financial products

Acquah Samuel acquahsamuel

🌀
Building financial products
View GitHub Profile
@acquahsamuel
acquahsamuel / countries
Created May 15, 2022 20:16 — forked from kalinchernev/countries
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria
const axios = require('axios')
const Payment = require('../models/Payment');
module.exports =
{
payInitialize : function (req, res, email, localId) {
axios
.post(
"https://api.paystack.co/transaction/initialize",
{
@acquahsamuel
acquahsamuel / devcamper_specs.md
Created May 1, 2021 17:56 — forked from bradtraversy/devcamper_specs.md
Specs for Devcamper Udemy course project

DevCamper Backend API Specifications

Create the backend for a bootcamp directory website. The frontend/UI will be created by another team (future course). The html/css template has been created and can be used as a reference for functionality. All of the functionality below needs to be fully implmented in this project.

Bootcamps

  • List all bootcamps in the database
    • Pagination
    • Select specific fields in result
    • Limit number of results
  • Filter by fields

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@acquahsamuel
acquahsamuel / samplerest.js
Created August 19, 2020 20:02 — forked from joshbirk/samplerest.js
Sample of using passport w/ mult strategies
var fs = require("fs")
var ssl_options = {
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
};
var port = process.env.PORT || 3000;
var express = require('express');
var ejs = require('ejs');
var passport = require('passport')
Handlebars.registerHelper("select", function(value, options) {
return options.fn(this)
.split('\n')
.map(function(v) {
var t = 'value="' + value + '"'
return ! RegExp(t).test(v) ? v : v.replace(t, t + ' selected="selected"')
})
.join('\n')
})