Skip to content

Instantly share code, notes, and snippets.

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

_bran BransonGitomeh

🏠
Working from home
View GitHub Profile
const axios = require('axios');
const initializeTransaction = (body, access_token) => async () => {
const headers = {
"Content-Type": "application/json",
"Authorization": "Bearer " + access_token
};
try {
const response = await axios.post("https://sandbox.safaricom.co.ke/mpesa/stkpush/v1/processrequest", body, { headers });
const resultData = response.data;
@BransonGitomeh
BransonGitomeh / .env
Last active June 22, 2023 19:57
Trading Bot for Managing Futures Positions This trading bot automates the process of opening and managing futures trading positions on Binance Futures. It allows you to profit from both rising and falling markets by leveraging futures contracts. Features: Automated position opening based on predefined symbols Continuous monitoring of Return on E…
BINANCE_API_KEY=
BINANCE_SECRET_KEY=
BINANCE_API_URL=https://fapi.binance.com
@BransonGitomeh
BransonGitomeh / hterrain_detail_enhanced.shader
Created August 5, 2021 10:58 — forked from wojtekpil/hterrain_detail_enhanced.shader
Hterrain enhanced shader for detail layers
shader_type spatial;
render_mode cull_disabled, blend_mix,diffuse_burley, specular_schlick_ggx;
uniform sampler2D u_terrain_heightmap;
uniform sampler2D u_terrain_detailmap;
uniform sampler2D u_terrain_normalmap;
uniform sampler2D u_terrain_globalmap : hint_albedo;
uniform mat4 u_terrain_inverse_transform;
uniform mat3 u_terrain_normal_basis;
extends Control
var data_file = "user://save"
func _ready():
print("checking if a registration has happened before")
var registrationData = load_from_file()
print("data returned from loading function ", registrationData)
extends Node
onready var types = get_node('/root/action_types')
func game_set_start_time(time):
return {
'type': types.GAME_SET_START_TIME,
'time': time
}
const moment = require("moment")
//login
const user_login_input = {
"username": "test",
"password": "test"
}
const user_login_output = {
"status": 1, // or 0 if failed,
var Waterline = require("waterline");
export default Waterline.Collection.extend({
identity: "innitializations",
datastore: "default",
primaryKey: "id",
attributes: {
id: { type: "string", required: true },
phoneNumber: { type: "string", required: true },
tool
extends Spatial
export var cluster_size = 3
# Called when the node enters the scene tree for the first time.
onready var box = preload("res://obj1.tscn")
func _ready():
print('cleaning up exising trees')
var boxes = get_tree().get_nodes_in_group("box_group")
@BransonGitomeh
BransonGitomeh / .env
Created May 20, 2020 18:47
s3 folder upload node js
ACCESS_KEY_ID=...
SECRET_ACCESS_KEY=...
AWS_REGION=...
S3_BUCKET=...
@BransonGitomeh
BransonGitomeh / gist:828087837b2642fe42f8bfaea545c4e1
Created March 11, 2020 15:16
JAVA_HOME fix for elementary OS 5.1 Hera
JAVA_HOME=$(dirname $( readlink -f $(which java) ))
JAVA_HOME=$(realpath "$JAVA_HOME"/../)
export JAVA_HOME
System Specifications
===========================================================
➜ ~ sudo lshw -short
H/W path Device Class Description
===============================================================
system HP ENVY dv6 Notebook PC (C2L47UA#ABA)