Skip to content

Instantly share code, notes, and snippets.

View DavidInnocent's full-sized avatar
💭
On stackOverflowwww

David Innocent DavidInnocent

💭
On stackOverflowwww
View GitHub Profile
const functions = require('firebase-functions')
const crypto = require('crypto')
const fs = require('fs');
const superagent = require('superagent')
const tokenURL = 'https://uat.jengahq.io/identity/v2/token'
const accountBalanceURL = 'https://uat.jengahq.io/account/v2/accounts/balances/KE/0744444444444'
const billValidationURL = 'https://uat.jengahq.io/transaction/v2/bills/validation'
const sendMoneyURL = 'https://uat.jengahq.io/transaction/v2/remittance'
const accountId = '0744444444444'
<?php
$headers = array(
'Content-Type: application/json',
'Accept: application/json',
'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiIxIiwianRpIjoiNzk3NDczNmI2NDRkMGRlZGJhMDdhMzVhNTA0MWMyY2I1ZTNhODU4YWJjZDk3MTQxMmYzNzZmMmZhOTgwMjNiZDBmMjYwMmQ4YjlhMWI3OWYiLCJpYXQiOjE1ODY5NDk1NjUsIm5iZiI6MTU4Njk0OTU2NSwiZXhwIjoxNjE4NDg1NTY1LCJzdWIiOiI0NiIsInNjb3BlcyI6W119.tbkq9tDxhVil3lJ1KuamujsEArfLssgnv020zqi7Nz7lGYpfk-pNm8EQ3FccPtFGxEx45Gvzn6G91Oo_8xHpGTeJ33QRWAsaywd2sB-x7FLnARLg3ij98VvGKMDXOoCNDysK8OZJzRFsgnY_9nCR2zNBonsLHZqfl8VnrUg6jkp0uuTj-zIAcEQkmNlCwOrtXc8XnizrmFcLwZa-y4ykTeF-hYUPkhPGpj_FSu4UwnLYWQ1_ah8WY22s125S--M2LdRui-LVfsbUTYpOGw7lxa59Zb2dFUZKwY75LsCkx7KrO-OzjHeHNq8fHgrqxGm0BgfvxCrdzE9ja0J26nj9eb0QaJakj-kFX43-yxi4lfVoX_vBImO-xeZPCDabQHSStjF9OaEMvfroadInr3zHslmia_zI8tqdRXd-gMbPmohof0Ky4r4wSNWAuryGVcSCueiAHuPhM8oTCYwXSJct64XebqloIFUQg52P0PmnRVdB9sqOKwRpl32Tq8HP_X76EqoKkt2JbVpljbXy1bLQqeQV79lbnF7cHfHNJUna96AgaLVYl3ll7xQT9XYDp0IAmJ1hBKBP0Y5mL-tt-rXCZGOfNsdzHV
package com.co.ximmoz.FireFy.ui.views.Activities;
import android.Manifest;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.PointF;
import android.os.Build;
import android.os.Bundle;
//OnboardingFragment
pagerAdapter=new OnboardingViewPagerAdapter(this);
viewPager2.setAdapter(pagerAdapter);
public class OnboardingViewPagerAdapter extends FragmentStateAdapter {
public OnboardingViewPagerAdapter(@NonNull Fragment fragment) {
<?php
header("Content-Type:application/json");
if (!isset($_GET["token"]))
{
echo "Technical error";
exit();
}
if ($_GET["token"]!='hahahahaha')
<?php
header("Content-Type:application/json");
if (!isset($_GET["token"]))
{
echo "Technical error";
exit();
}
if ($_GET["token"]!='hahahahaha')
{
echo "Invalid authorization";
<?php
header("Content-Type:application/json");
$shortcode='your shortcode';
$consumerkey ="your consumer key";
$consumersecret ="your secret";
$validationurl="./validation.php?token=hahahahaha";
$confirmationurl="./confirmation.php?token=hahahahahaha";
$authenticationurl='https://sandbox.safaricom.co.ke/oauth/v1/generate?grant_type=client_credentials';
<?php
header("Content-Type: application/json");
$response = '{
"ResultCode":0,
"ResultDesc":"Confirmation recieved successfuly"
}';
$mpesaResponse = file_get_contents('php://input');
let url = 'https://api.demo.reja.ai/auth'
let auth_data = {
"email": "hello@intelipro",
"dashboard_id": "interview",
"password": "interview07August"
}
superagent.get(url)
.set('Content-Type', 'application/json')
import java.util.HashMap;
public class start {
public static void main(String args[]) //static method
{
String[] data = {"1", "2", "3", "4", "5", "2"};
transformList(data);
}