Skip to content

Instantly share code, notes, and snippets.

View CeoFred's full-sized avatar
🏠
Working from home

Johnson-Awah Alfred CeoFred

🏠
Working from home
View GitHub Profile
@CeoFred
CeoFred / update.js
Created March 18, 2023 16:33
Send PUT request to PHP server using fetch API
var urlencoded = new URLSearchParams()
urlencoded.append('first_name', "alfred")
urlencoded.append('last_name', "johnson")
urlencoded.append('gender', "1")
urlencoded.append('email', "myemail@gmail.com")
urlencoded.append('phone_number', "08159")
const url = '/update.php'
@CeoFred
CeoFred / main.go
Created January 4, 2023 16:41
Log errors to a file in golang
package main
import "fmt"
import "os"
import "log"
func main() {
logfile,err := os.Create("log.txt")
@CeoFred
CeoFred / contracts...Season2.sol
Created July 21, 2022 19:25
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
// TODO: Change name for production!!
contract PhatMan is ERC721A, Pausable, Ownable {
using Strings for uint256;
/**
*Submitted for verification at Etherscan.io on 2021-09-05
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// [MIT License]
/// @title Base64
Here are some products that you can use to build your fintech app
## SMS
Termii
Twilio
Interswitch Digital (Vanso)
## Card and account charge
@CeoFred
CeoFred / cert.conf
Last active December 19, 2020 21:02
The following files are used in one of my blog post which talks about setting up ssl for apache server found here https://blog.codemon.me/fix-request-redirecting-to-https-secured-connection-on-local-codeigniter-3
[ req ]
default_bits = 2048
default_keyfile = server-key.pem
distinguished_name = subject
req_extensions = req_ext
x509_extensions = x509_ext
string_mask = utf8only
[ subject ]
@CeoFred
CeoFred / 1_Storage.sol
Created October 31, 2020 19:51
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.11+commit.c082d0b4.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
uint256 number;
@CeoFred
CeoFred / solution.js
Created July 23, 2020 21:34 — forked from gitfaf/solution.js
Solves lycanthrope's log problem from eloquent javascript.
/* Data from http://eloquentjavascript.net/code/#4 */
/* phi logic from http://www.pmean.com/definitions/phi.htm */
var JOURNAL = [
{"events":["carrot","exercise","weekend"],"squirrel":false},
{"events":["bread","pudding","brushed teeth","weekend","touched tree"],"squirrel":false},
{"events":["carrot","nachos","brushed teeth","cycling","weekend"],"squirrel":false},
{"events":["brussel sprouts","ice cream","brushed teeth","computer","weekend"],"squirrel":false},
{"events":["potatoes","candy","brushed teeth","exercise","weekend","dentist"],"squirrel":false},
{"events":["brussel sprouts","pudding","brushed teeth","running","weekend"],"squirrel":false},
@CeoFred
CeoFred / settings.json
Created January 31, 2020 22:00
My VS Code settings
{"editor.formatOnSave": false,
"editor.detectIndentation": true,
"editor.fontSize": 15,
"editor.lightbulb.enabled": true,
"editor.parameterHints.enabled": true,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
"editor.rulers": [],
"editor.snippetSuggestions": "top",
"editor.wordBasedSuggestions": false,
@CeoFred
CeoFred / about Me .MD
Last active June 4, 2019 02:59
#Who-am-I?

Who am I?

Well I am Johnson-Awah Alfred

Awesome Me

A GDG FUTO Co-Orgnizer

GDG FUTO Co-Organizer