Skip to content

Instantly share code, notes, and snippets.

View rayterrill's full-sized avatar

Ray Terrill rayterrill

View GitHub Profile
@sonibla
sonibla / download-github-private-asset.ps1
Created November 29, 2021 10:39
Download assets from private Github releases using PowerShell
$credentials="<github_access_token>"
$repo = "<user_or_org>/<repo_name>"
$file = "<name_of_asset_file>"
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Authorization", "token $credentials")
$releases = "https://api.github.com/repos/$repo/releases"
Write-Host Determining latest release
$id = ((Invoke-WebRequest $releases -Headers $headers | ConvertFrom-Json)[0].assets | where { $_.name -eq $file })[0].id
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install 1password dropbox googlechrome nodejs powershell slack notepadplusplus git git-credential-manager-for-windows atom spotify 7zip Virtualbox vagrant conemu dropbox putty minikube -Confirm:$false -Force
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole
#setup git
git config --global user.email "rayjohnterrill@gmail.com"
git config --global user.name "rayterrill"
Tool Website Description Really Like?
Vagrant https://www.vagrantup.com/ Vagrant is a tool for building and managing virtual machine environments in a single workflow
Kafka https://kafka.apache.org/ Kafka is used for building real-time data pipelines and streaming apps.
InfluxDB https://www.influxdata.com/time-series-platform/influxdb/ InfluxDB is used as a data store for any use case involving large amounts of timestamped data, including DevOps monitoring, application metrics, IoT sensor data, and real-time analytics.
Grafana https://grafana.com/grafana Visualization tool for InfluxDB, Graphite, Prometheus, ElasticSearch, AWS CloudWatch, etc
Etcd https://github.com/coreos/etcd Distributed reliable key-value store for the most critical data of a distributed system
Fluentd https://www.fluentd.org/ Fluentd is an open source data collector for unified logging layer.
RethinkDB https://www.reth
Param(
[Parameter(Mandatory=$True,Position=1)][string]$pdfFile,
[Parameter(Mandatory=$True,Position=2)][string]$eventFile
)
#uses cPDF http://community.coherentpdf.com/
#the pdf file, cpdf, and the event file should be in the current directory
#clean up any previously split ticket pdfs
#splits a pdf $pdfFile by pages into files matching Ticket001.pdf, etc in the same directory
@lee8oi
lee8oi / startProcess.go
Last active January 4, 2024 01:19
Using os.StartProcess() in Go for platform-independent system command execution.
package main
import (
"os"
"os/exec"
)
func Start(args ...string) (p *os.Process, err error) {
if args[0], err = exec.LookPath(args[0]); err == nil {
var procAttr os.ProcAttr