Skip to content

Instantly share code, notes, and snippets.

View Oliver-ke's full-sized avatar
💭
-code -eat -sleep -repeat

Azorji Kelechi Oliver Oliver-ke

💭
-code -eat -sleep -repeat
View GitHub Profile

Chaincode Bitcoin Exercise


Student Details

Submission Comments

I added all my solution code to "custom_method", and then invoked it in "run_test".

@Oliver-ke
Oliver-ke / my_contracts.sol
Last active July 18, 2022 08:07
My solidity contracts snippets
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.5.1;
// enums
// contract Mycontract2 {
// // using enums in solidity
// enum State { Waiting, Activated, Pending }
// State public state;
@Oliver-ke
Oliver-ke / ErrorBoundary.jsx
Created January 4, 2021 09:16
Snippet for react error boundary component
import React, {Component} from 'react';
class ErrorBoundary extends Component {
constructor(props) {
super(props)
this.state = {
hasError: false,
}
}
@Oliver-ke
Oliver-ke / sendmailGun.js
Created November 16, 2020 10:00
Util function to send mails from cloud function
const Mailgun = require('mailgun-js');
const DOMAIN = 'mail.myfortvest.com';
const API_KEY = process.env.MAIL_API_KEY || '';
const PUBLIC_KEY = process.env.MAIL_PUBLIC_KEY || '';
const mailgun = Mailgun({ apiKey: API_KEY, domain: DOMAIN, publicApiKey: PUBLIC_KEY });
const sendMail = async (payload) => {
const {variable, desc, ...rest} = payload;
const variableKey = Object.keys(payload.variable);

This gist contains useful code, packagesS, script, commands for computer networking and systems admins

Scripts

Type: (powershell)
Purpose: Provides users file access to admin on login
$user = "presidential\wheel"
$paths = @($env:userprofile)
$folders = @(

Langage

  • Typescript

Frontend

  • Reactjs
  • Jest
  • Apollo Client
  • Auth0
  • Eslint and prettier
  • Travis
import React, { useState, useEffect } from 'react';
import { Link, useHistory, useLocation } from "react-router-dom";
import axios from '../../services/axios';
import { message as alert } from 'antd';
import Header from '../header/header.component';
import './update-resources.css';
import Spinner from '../spinner/spinner.component';
export default function updateResource(props) {
const [loading, setLoading] = useState(false);

Login to PostgreSQL from command line

sudo -u postgres psql postgres

or

psql -u [username] -d [database name]
@Oliver-ke
Oliver-ke / FM-fullstack.md
Last active July 14, 2022 14:10
Note on Full Stack development at Frontend Masters

Note on Full Stack development at Frontendmasters.com

note: exclude the leading $ for commands, that just shows it a bash script and is meant to be run in a terminal

Full Stack => Knowing everything up from the front to the back

Frontend can be

  • Cars, -television, -browser, -etc

backend can be

  • API's, -platform, -Database -Security,
@Oliver-ke
Oliver-ke / vscode_shortcuts.md
Created April 16, 2020 04:09 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands