Skip to content

Instantly share code, notes, and snippets.

View cookiemonster's full-sized avatar
🏠
Working from anywhere

Victor Gevers cookiemonster

🏠
Working from anywhere
View GitHub Profile

Keybase proof

I hereby claim:

  • I am cookiemonster on github.
  • I am divd_victor (https://keybase.io/divd_victor) on keybase.
  • I have a public key whose fingerprint is E604 E5DF 0BDB E426 FA7F B4C3 E1C3 FD07 4983 7B18

To claim this, I am signing this object:

@cookiemonster
cookiemonster / wifi_signal_monitor.ps1
Created May 17, 2021 09:29
PowerShell WIFI signal strength monitor includes the SSID so you can tell if you're switching WIFI networks.
# Parse netsh output like this into a hashtable so can easily use in scripts, etc
# Transmit rate (Mbps) : 57.8
[hashtable]$wlan = @{};netsh.exe wlan show interfaces | ForEach-Object{ if( $_ -match '(\w[^:]+):\s+?(\w.*)$' -and ! [string]::IsNullOrEmpty( $matches[2] ) ) { $wlan.Add( $matches[1].Trim() , $matches[2] )}}
# Using the above to implement a signal strength monitor that updates every 5 seconds
While($true){ [hashtable]$wlan = @{};netsh.exe wlan show interfaces | ForEach-Object{ if( $_ -match '(\w[^:]+):\s+?(\w.*)$' -and ! [string]::IsNullOrEmpty( $matches[2] ) ) { $wlan.Add( $matches[1].Trim() , $matches[2] )}} ; "{0} {1} {2:4} {3}" -f (Get-Date -Format G) , $wlan.SSID , $wlan.Signal , ( "$([char]4)" * [int]($wlan.Signal -replace '%') ) ; start-sleep 5 }
@cookiemonster
cookiemonster / workaround.xml
Created April 21, 2021 10:33
Pulse VPN users can download and import the file under the following location: Go to Maintenance > Import/Export > Import XML. Import the file. This disables the Pulse Collaboration. If there is a load balancer in front of the PCS, this may affect the Load Balancer. If your load balancer is using round robin or using HealthCheck.cgi or advanced …
<configuration xmlns="http://xml.pulsesecure.net/ive-sa/9.0R5" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" iveData="3166" saData="3104">
<system>
<configuration>
<security>
<blacklists>
<patch>
<name>2104-a</name>
<content-encrypted>3u+UR6n8AgABAAAAkMVZR4MWAWw8PJFpYwTzo/15TvQnKFfLbsJa7faJbBaMaBb2eYML+wMCviGQhDOu</content-encrypted>
</patch>
<patch>
sudo apt install dirmngr gnupg apt-transport-https software-properties-common ca-certificates curl
curl -fsSL https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -
sudo add-apt-repository 'deb https://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main'
sudo apt update
sudo apt install mongodb-org-tools
@cookiemonster
cookiemonster / Laravel-add-page.md
Created July 14, 2020 09:00
Pagina toevoegen aan een Laravel applicatie

Pagina toevoegen aan een Laravel applicatie

Hoe voeg je een (statische) pagina toe aan een laravel applicatie, en dan specifiek de HNNW applicatie. Voordat je hieraan begint is het slim als je de Language bestanden aanpassen guide eerst leest.

MVC

Het Laravel framework houdt zich aan de Model-View-Controller principes. Daarnaast worden er, door zowel Laravel als het HNNW project een aantal best practices aangehouden zoals SOLID design principles. Zal er verder niet te ver op in gaan maar als dit je niks zegt is het het waard om dat door te lezen om een idee te krijgen van de filosofie achter deze manier van programmeren.

Flow

@cookiemonster
cookiemonster / toggle-light-dark.html
Created May 23, 2020 11:36
HTML switch: dark/light
<div class="component_container" data-component="theme_switch" data-context="{}">
<button class="svg-icon theme-switch" data-v-3a89f969="" context="[object Object]">
<span class="sr-only" data-v-3a89f969="">Wissel kleurenschema</span>
<i class="svg-icon" data-v-682d3a76="" data-v-3a89f969="">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-labelledby="Wissel kleurenschema" role="presentation" data-v-682d3a76="">
<title lang="nl" data-v-682d3a76="">Wissel kleurenschema</title><g data-v-682d3a76="">
<g fill="none" fill-rule="evenodd" data-v-682d3a76=""><path d="M0 0h24v24H0z"></path><rect width="1" height="3" x="12" fill="currentColor" rx=".5"></rect><rect width="1" height="3" x="12" y="21" fill="currentColor" rx=".5"></rect><rect width="1" height="3" x="22" y="10.5" fill="currentColor" rx=".5" transform="rotate(90 22.5 12)"></rect><rect width="1" height="3" x="1" y="10.5" fill="currentColor" rx=".5" transform="rotate(90 1.5 12)"></rect><rect
@cookiemonster
cookiemonster / sensenets_operators
Created May 22, 2020 13:49
SenseNets operators
{
"ip": "106.124.104.173",
"city": "Ailan Mubage",
"region": "Xinjiang",
"country": "CN",
"loc": "43.9085,81.3330",a
"org": "AS4134 CHINANET-BACKBONE",
"timezone": "Asia/Shanghai",
"readme": "https://ipinfo.io/missingauth"
}{

Keybase proof

I hereby claim:

  • I am cookiemonster on github.
  • I am divd_victor (https://keybase.io/divd_victor) on keybase.
  • I have a public key whose fingerprint is A2A7 8A35 D764 FA78 482D BBCD B7B6 5BE9 94D4 A086

To claim this, I am signing this object:

@cookiemonster
cookiemonster / Docsify project template
Last active June 30, 2019 15:44
a Docsify project template
<!-- index.html -->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta charset="UTF-8">
<!-- <link rel="stylesheet" href="//unpkg.com/docsify/themes/vue.css"> -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsify-themeable@0/dist/css/theme-simple-dark.css">
</head>
PROSTFU: "Pull request(s) or STFU"