Skip to content

Instantly share code, notes, and snippets.

View kjegru's full-sized avatar

Kjetil Grun kjegru

  • NINA Norsk Institutt for Naturforskning
  • Trondheim
View GitHub Profile
@kjegru
kjegru / Sheety-Pokemons.ps1
Created December 28, 2019 20:12
Use Sheety as an API for Powershell. Using pokemons as an example.
$url = "https://v2-api.sheety.co/randomstringnameforGoogleSheet/test/pokemons"
$contentType = "application/json"
$method = "POST" # GET DELETE PUT alternatively
$json = @"
{
"pokemon": {
"id": 723,
"number": 722,
"name": "Weepinball",
# Simple and stupid script that locks the computer and starts filming using the webcam if the mouse coursor moves
# Requires ffmpeg to be installed
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
function mousecheck {
while($true)
{
Start-Sleep -m 500 #added delay
$mouseY = ([System.Windows.Forms.Cursor]::Position.Y ) #read the Y coordinates
@kjegru
kjegru / Get-Traceroute.ps1
Created January 5, 2017 10:05 — forked from tylerapplebaum/Get-Traceroute.ps1
MTR for Powershell
<#
.SYNOPSIS
An MTR clone for PowerShell.
Written by Tyler Applebaum.
Version 2.0
.LINK
https://gist.github.com/tylerapplebaum/dc527a3bd875f11871e2
http://www.team-cymru.org/IP-ASN-mapping.html#dns