Skip to content

Instantly share code, notes, and snippets.

View mrxinu's full-sized avatar

Steve Klassen mrxinu

View GitHub Profile
package main
import (
"image"
"image/color"
"math"
"math/rand"
"time"
"github.com/peterhellberg/natsdraw"
@mrxinu
mrxinu / ebiten-gfx-blocks.go
Created November 11, 2020 13:11 — forked from peterhellberg/ebiten-gfx-blocks.go
Blocks rendered by Ebiten with gfx.
package main
import (
"github.com/hajimehoshi/ebiten"
"github.com/peterhellberg/gfx"
)
const (
title = "Ebiten GFX Blocks"
scale = 4
@mrxinu
mrxinu / gfx-sprator.go
Created November 11, 2020 12:57 — forked from peterhellberg/gfx-sprator.go
Sprator using gfx inspired by https://github.com/yurkth/sprator
package main
import (
"flag"
"image"
"image/color"
"time"
"github.com/peterhellberg/gfx"
)
package main
import (
"bytes"
"flag"
"image"
"image/color"
"image/draw"
"image/png"
"math"

Run from the command ruby script_name.rb API_TOKEN 2018-01-01 2018-12-31 or ruby script_name.rb API_TOKEN 2018-01-01 2018-12-31 eu if on the EU datacenter.

# ruby script_name.rb API_TOKEN 2019-01-01 2019-12-31
require 'samanage'
require 'csv'

api_token, start_date, end_date, datacenter = ARGV
@samanage = Samanage::Api.new(token: api_token, datacenter: datacenter)
DEFAULT_FILENAME = "Incident Report #{DateTime.now.strftime("%b-%d-%Y-%l%M")}.csv"
<AlertDefinition xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SolarWinds.Orion.Core.Alerting.Models">
<AlertID>1009</AlertID>
<AlertMessage>All replication neighbors are dead</AlertMessage>
<AlertRefID>74913425-d003-4b48-bcb0-96a049f31ce6</AlertRefID>
<Canned>false</Canned>
<Category />
<CreatedBy>omavel</CreatedBy>
<CustomProperties xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
@mrxinu
mrxinu / values_pointers.go
Created April 26, 2020 21:36 — forked from josephspurrier/values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value
@mrxinu
mrxinu / import_whd_tickets.rb
Created February 4, 2020 13:38 — forked from cw2908/import_whd_tickets.rb
Import Incidents from WHD export
# frozen_string_literal: true
#################################################################
##
## First install the wrapper & xml parser `gem install samanage nokogiri`
## To run `ruby import_whd_tickets.rb api-token export-file.csv`
##
##
## The CSV input columns were:
##
@mrxinu
mrxinu / Windows10-Setup.ps1
Created September 18, 2017 17:09 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
@mrxinu
mrxinu / boxstarter.ps1
Created September 18, 2017 15:17 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt: