| Segment | Meaning |
|---|---|
| host | machine name (STATUSLINE_HOST overrides) — handy when you ssh between boxes |
| model | current model |
| dir | working dir, trimmed to the last two components |
| git | branch; yellow on main/master, * = uncommitted tracked changes, ↑N = unpushed commits |
This file contains hidden or 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
| { | |
| "name": "fetch-ci-logs", | |
| "version": "1.0.0", | |
| "description": "Download GitHub Actions logs for CI workflows", | |
| "main": "fetch-ci-logs.js", | |
| "bin": { | |
| "fetch-ci-logs": "./fetch-ci-logs.js" | |
| }, | |
| "scripts": { | |
| "fetch-logs": "node fetch-ci-logs.js fetch-logs", |
This file contains hidden or 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
| #!/usr/bin/env node | |
| const axios = require('axios'); | |
| const fs = require('fs').promises; | |
| const path = require('path'); | |
| const { execSync, spawn } = require('child_process'); | |
| // Utility functions | |
| function truthyEnv(value) { | |
| if (value === null || value === undefined) return false; |
This file contains hidden or 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
| # frozen_string_literal: true | |
| require "json" | |
| require "fileutils" | |
| require "faraday" | |
| namespace :ci do | |
| # Usage examples: | |
| # bundle exec rake ci:fetch_logs | |
| # bundle exec rake ci:fetch_logs[ci.yml] |
This file contains hidden or 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
| class DeleteTicJob | |
| include Sidekiq::Job | |
| sidekiq_options queue: "default", retry_queue: "errors" | |
| def perform(ticket_id) | |
| require "zendesk_api" | |
| client = ZendeskAPI::Client.new do |config| | |
| config.url = ENV["ZENDESK_URL"] # e.g. https://yoursubdomain.zendesk.com/api/v2 | |
| config.username = ENV["ZENDESK_USERNAME"] |
This file contains hidden or 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
| class Dashing.Btcprice extends Dashing.Widget | |
| @accessor 'value', Dashing.AnimatedValue | |
| @accessor 'btcprice', -> | |
| if @get('value') | |
| price = parseFloat(@get('value')) |
This file contains hidden or 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
| class Dashing.Ethprice extends Dashing.Widget | |
| @accessor 'value', Dashing.AnimatedValue | |
| @accessor 'ethprice', -> | |
| if @get('value') | |
| price = parseFloat(@get('value')) |
This file contains hidden or 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
| require 'net/http' | |
| require 'json' | |
| require 'uri' | |
| SCHEDULER.every '5s', allow_overlapping: false do | |
| uri = URI.parse('https://api.coinbase.com/v2/prices/LTC-USD/spot') | |
| http = Net::HTTP.new(uri.host, uri.port) | |
| http.use_ssl = true | |
| request = Net::HTTP::Get.new(uri.request_uri) |
This file contains hidden or 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
| {{ email_in.body | scan: '(Job Number:|Incident) (INC[0-9]*)', '0'}} |
NewerOlder