Skip to content

Instantly share code, notes, and snippets.

View percybolmer's full-sized avatar

ProgrammingPercy percybolmer

View GitHub Profile
package main
import (
"testing"
)
func TestThis(t *testing.T) {
}
package main
import (
"database/sql"
"fmt"
"os"
"testing"
_ "github.com/lib/pq"
)
# This is a basic workflow to help you get started with Actions
name: build and test
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
pull_request:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Programming with Percy</title>
</head>
<body>
Hello, your using AWS Amplify to host this via a GitHub Repo!
</body>
package main
import (
"fmt"
// aws-lambda package has to be imported
"github.com/aws/aws-lambda-go/lambda"
)
// User is a simple struct to accept as input
type User struct {
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"dynamodb:PutItem",
"dynamodb:DeleteItem",
"dynamodb:GetItem",
package main
import (
"fmt"
"os"
// aws-lambda package has to be imported
"github.com/aws/aws-lambda-go/lambda"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Programming with Percy</title>
<!-- Add some CSS to change client UI -->
<style>
body {
background-color: #232F3E;
@percybolmer
percybolmer / Crypto-BEP20-DevToken-V1.0
Last active May 12, 2021 19:18
A example on how we create a super simple erc20 token
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
// Define our DevToken smart contract.
contract DevToken {
// Constructor is a function that will run when the Token is created.
constructor() {
}
@percybolmer
percybolmer / Crypto-BEP20-Migration-DevTokenV1
Last active May 12, 2021 20:32
A simple deployment / migration script for a devtoken
// Make sure the DevToken contract is included by requireing it.
const DevToken = artifacts.require("DevToken");
// THis is an async function, it will accept the Deployer account, the network, and eventual accounts.
module.exports = async function (deployer, network, accounts) {
// await while we deploy the DevToken
await deployer.deploy(DevToken);
const devToken = await DevToken.deployed()
};