Skip to content

Instantly share code, notes, and snippets.

View azarus's full-sized avatar

Azarus azarus

  • While Loop
View GitHub Profile
@azarus
azarus / k8s
Created May 19, 2025 02:31
Init & setup script for k8s clusters
#!/bin/bash
set -e
MODE=$1
if [ -z "$MODE" ]; then
echo "Usage: $0 {configure|init|reset}"
exit 1
fi

Unofficial Fab.com API Documentation

Base URL

All API endpoints are accessed via:

https://www.fab.com/i/

@azarus
azarus / ui.js
Created May 16, 2021 01:11
UI Backend for Chia
var child_process = require("child_process");
const http = require('http');
function getFarmingSummary()
{
let data = child_process.execSync("cd /root/chia && . ./activate && chia farm summary").toString();
let farmingStatus = data.match(/Farming status\: (?<Data>(.*))/);
let totalChiaFarmed = data.match(/Total chia farmed\: (?<Data>(.*))/);
let userTransactionFees = data.match(/User transaction fees\: (?<Data>(.*))/);
let blockRewards = data.match(/Block rewards\: (?<Data>(.*))/);
@azarus
azarus / gulptask.js
Last active March 7, 2022 20:31
Gulp Task to transform Typescript path imports into relative paths using the tsconfig
// Gulp Task
gulp.task("compile:source", function(done) {
gutil.log(gutil.colors.yellow("[Typescript]"), gutil.colors.magenta('Transpiling Source'));
var tsProject = ts.createProject('tsconfig.json', {
typescript: require('typescript'),
});
gulp.src("source/**/*")
.pipe(tsProject())
.pipe(tsimport(tsProject.config.compilerOptions))
@azarus
azarus / Request.ts
Last active March 27, 2019 12:35
SIMPLE AND EASY HTTP REQUESTS IN ANGULAR2! GET A PROMISE AND USE IT EASILY!
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { Config } from '../Config';
import { Observable } from 'rxjs/Observable';
import 'rxjs/Rx';
@Injectable()
export class Request {
constructor(public http: Http)