This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>(.*))/); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |