Skip to content

Instantly share code, notes, and snippets.

View Kipjr's full-sized avatar

Martijn Kipjr

  • OGD ict-diensten
  • 22:33 (UTC +02:00)
View GitHub Profile
@Kipjr
Kipjr / Set-OVChipkaartCheckbox
Last active January 11, 2024 09:43
Checks the boxes of OV-Chipkaart reishistory based on parameters
// press F12 and paste this in console
// https://www.ov-chipkaart.nl/nl/mijn-ov-chip/mijn-ov-reishistorie
//
// Blaak,Utrecht,Amsterdam
const stationsRAW = prompt("Stationsnamen");
const stations = stationsRAW.split(",")
const werkdagen = ['maandag', 'dinsdag', 'woensdag', 'donderdag','vrijdag'];
var uncheckall = document.getElementById("ag-5-input"); uncheckall.click();
@Kipjr
Kipjr / userdata
Last active March 27, 2023 07:35
nocloud/userdata
#cloud-config
autoinstall:
version: 1
refresh-installer:
update: no
channel: edge
early-commands:
- /cdrom/_SOFTWARE/early.sh
apt:
geoip: true
@Kipjr
Kipjr / getAndroidChromeTabs.js
Last active August 29, 2023 07:03
getAndroidChromeTabs.js
// go to 'chrome://inspect/#devices'
// press F12 and paste this in console
var tabs = confirm("Open all in tabs?")
var urlonly = confirm("URLS only?")
var serials = [...document.getElementsByClassName("device-serial")];
var mapping = [];serials.forEach((e,i) => {
mapping[i]=confirm(e.textContent)
})
var ser = serials.filter((e,i)=> {
@Kipjr
Kipjr / KeyPrompt.ps1
Last active August 24, 2021 13:21
Powershell Key Prompt
#Function GetKeyPress([string]$regexPattern='[0-9]', [string]$message=$null, [int]$timeOutSeconds=0){
Function GetKeyPress( [string]$message=$null, [int]$timeOutSeconds=0){
$key = $null
$Host.UI.RawUI.FlushInputBuffer()
if (![string]::IsNullOrEmpty($message)){
Write-Host -NoNewLine $message
}
$counter = $timeOutSeconds * 1000 / 250
while($key -eq $null -and ($timeOutSeconds -eq 0 -or $counter-- -gt 0)){
if (($timeOutSeconds -eq 0) -or $Host.UI.RawUI.KeyAvailable){
@Kipjr
Kipjr / torch.lua
Created April 17, 2020 12:16
ComputerCraft/turtle_torch
--[[
Changelog
0.01 - Torch extract from mine.lua
--]]
--[[
@Kipjr
Kipjr / mine.lua
Last active April 12, 2020 22:50
ComputerCraft/turtle_mine
--[[
John Excavation Turtle Program(New)
Changelog
0.01 - Starting Of Rewriting
0.02 - More Writing
0.03 - Adding Fuel Code
0.04 - Small but many program error fixed
0.05 - Fully Test
0.06 - Fixing Minor Bug when add 3 to deep because firstdig had no 3 add to deepcount