Skip to content

Instantly share code, notes, and snippets.

View k0d3d's full-sized avatar
🎯
Focusing

Rhema k0d3d

🎯
Focusing
View GitHub Profile
@k0d3d
k0d3d / ProjectVerification.md
Created August 16, 2024 14:23
ticket number 2370 solpress.dev

ticket number 2370 solpress.dev

<?php
private function handlePaydayInvoiceUpdate($invoice_id, $action) {
$body = [];
if ($action == 'PAID') {
$body["status"] = "PAID";
$body["paidDate"] = Carbon::now()->toDateTimeString();
$body["paymentType"] = "d4a76367-d9dc-4fd0-9671-f789fee6cd16";
}
if($action === "REFUND") {
[
{
"mint": "DPTgLsaMtUxEvSWgn1tcD7bu3GbEMNA3uSyymVY7mTtA"
},
{
"mint": "H7NtYfqD9w8BSzT4qBTXJ1WM3L7nkW6nN1MYR9dRkVeq"
},
{
"mint": "HRtgq6Xm1whbggjiwqe2SXfgLvTYsYQ3WgC1pPr2Ac9k"
},
import * as solanaWeb3 from '@solana/web3.js';
const theblockchainapi = require('theblockchainapi')
const jsonfile = require('jsonfile')
let defaultClient = theblockchainapi.ApiClient.instance;
let APIKeyID = defaultClient.authentications['APIKeyID'];
let APISecretKey = defaultClient.authentications['APISecretKey'];
APIKeyID.apiKey = 'xxx';
const arrayOfEvenNumbers = (numbers) => {
const arrayForEventualResults = []
for (let index = numbers.length - 1; index >= 0; index--) {
// check if this is an even index
if (index % 2 === 0) {
// check if the number at this index is evem
const numberAtCurrentIndex = numbers[index]
if (numberAtCurrentIndex % 2 === 0) {
// add the number to the `arrayForEventualResults`
@k0d3d
k0d3d / avg.js
Created July 3, 2019 13:39
Average and Sort
const arr = [
{
"name": "Jeff",
"ranking": 1
},
{
"name": "Kevin",
"ranking": 5
},
{
@k0d3d
k0d3d / team-edit.page.html
Last active May 21, 2019 01:54
part of the edit team form
.......
<form [formGroup]="teamsEdit">
<ion-list no-lines>
<ion-item>
........
</ion-select>
</ion-item>
<app-sport-category [fieldof]="'sportName'" [parentForm]="teamsEdit"></app-sport-category>
.....
<ion-item>
<ion-label>
Sport Name
</ion-label>
<ion-select placeholder="Select Sport" (ionChange)="pickedSport($event)">
<ion-select-option *ngFor="let sc of list" [value]="sc.CategoryName">{{sc.CategoryName}}</ion-select-option>
</ion-select>
</ion-item>
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { BoardService } from '../../services/board/board.service'
@Component({
selector: 'app-sport-category',
templateUrl: './sport-category.component.html',
styleUrls: ['./sport-category.component.scss']
})
export class SportCategoryComponent implements OnInit {y
@Input() parentForm // input decorator
@k0d3d
k0d3d / prime.js
Last active April 19, 2019 10:45
Count Prime Number Arrays
function currentNumbers(s, marker) {
let range = new RegExp(`.{1,${marker}}`, 'g')
return s.match(range);
}