Custom statusline for GitHub Copilot CLI on Windows using PowerShell.
🔌 Battery (or AC plug) | ⚙️ CPU usage | 🧠 RAM usage | 💽 Free disk space | 🌦️ Weather (via wttr.in) | 🎵 Spotify (if playing)
| { | |
| "__inputs": [ | |
| { | |
| "name": "DS_AZURE_MONITOR", | |
| "label": "Azure Monitor", | |
| "description": "", | |
| "type": "datasource", | |
| "pluginId": "grafana-azure-monitor-datasource", | |
| "pluginName": "Azure Monitor" | |
| } |
Custom statusline for GitHub Copilot CLI on Windows using PowerShell.
🔌 Battery (or AC plug) | ⚙️ CPU usage | 🧠 RAM usage | 💽 Free disk space | 🌦️ Weather (via wttr.in) | 🎵 Spotify (if playing)
| { | |
| "logLevel": "all", | |
| "footer": { | |
| "showModelEffort": true, | |
| "showDirectory": true, | |
| "showBranch": true, | |
| "showContextWindow": true, | |
| "showQuota": true, | |
| "showAiUsed": true, | |
| "showAgent": true, |
| pragma solidity ^0.5.8; | |
| contract TimeControl{ | |
| address private owner; | |
| mapping (address => uint[]) private employeeRecords; | |
| constructor() public{ | |
| owner = msg.sender; | |
| } | |
| function Register() public{ | |
| employeeRecords[msg.sender].push(now); | |
| } |
| async (error, transactionHash) => { | |
| if (error) { | |
| console.log(`error: ${error}`); | |
| } | |
| else { | |
| console.log(`transaction hash: ${transactionHash}`); | |
| let receipt = await web3.eth.getTransactionReceipt(transactionHash); | |
| console.log('Contract address: ' + receipt.contractAddress); | |
| let contractDeployed = new web3.eth.Contract(abi, receipt.contractAddress); | |
| contractDeployed.methods.Register.send({ from: creatorAccount }, (err, data) => { |
| const Web3 = require('web3'); | |
| let web3 = new Web3(new Web3.providers.HttpProvider("HTTP://127.0.0.1:7545")); | |
| web3.eth.getAccounts().then(accounts => { | |
| //Get the account which create the contract | |
| let creatorAccount = accounts[0]; | |
| //Deploy contract | |
| const contract = new web3.eth.Contract(abi); | |
| contract.deploy({ | |
| data: '0x' + bytecode |
| const path = require('path'); | |
| const fs = require('fs'); | |
| const solc = require('solc'); | |
| const contractPath = path.resolve(__dirname, "..", 'TimeControl.sol'); | |
| const source = fs.readFileSync(contractPath, 'utf8'); | |
| let jsonContractSource = JSON.stringify({ | |
| language: 'Solidity', | |
| sources: { | |
| 'TimeControl': { |
| pragma solidity ^0.5.8; | |
| contract TimeControl{ | |
| address private owner; | |
| mapping (address => uint[]) private employeeRecords; | |
| constructor() public{ | |
| owner = msg.sender; | |
| } | |
| function Register() public{ | |
| employeeRecords[msg.sender].push(now); | |
| } |
| function calculateFibonacci(number) { | |
| if (number == 0 || number == 1) | |
| return number; | |
| return (calculateFibonacci(number - 1) + calculateFibonacci(number - 2)); | |
| } | |
| function doStuff(serie) { | |
| return new Promise((resolve, reject) => { | |
| if (typeof serie === 'number') { | |
| var results = []; |
| @using Microsoft.Extensions.Configuration | |
| @inject IConfiguration Configuration | |
| <style> | |
| #home { | |
| background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url(https://live.staticflickr.com/4544/27053562599_40e1815d95_k.jpg); | |
| } | |
| #about { | |
| background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url(@Configuration["AppConfigurationDemo:Index:AboutImage"]); |