Skip to content

Instantly share code, notes, and snippets.

View philipproplesch's full-sized avatar
🏠
Working from home

Philip Proplesch philipproplesch

🏠
Working from home
View GitHub Profile
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
# Opens a PowerShell instance with elevation, finds the wsl ip without relying on hostname, since ArchWSL and others doesn't have it
# then iterate opening the selected ports
$principal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
$remoteport = wsl -- ip -o -4 -json addr list eth0 ` | ConvertFrom-Json ` | %{ $_.addr_info.local } ` | ?{ $_ }
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if($found) {
$remoteport = $matches[0];
} else{
@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active November 4, 2025 06:00
Building a react native app in WSL2
@alvr
alvr / packages.md
Last active March 21, 2025 09:05
Available Packages

Available Packages:

Path Version Description
add-ons;addon-google_apis-google-15 3 Google APIs
add-ons;addon-google_apis-google-16 4 Google APIs
add-ons;addon-google_apis-google-17 4 Google APIs
add-ons;addon-google_apis-google-18 4 Googl
@kerelist
kerelist / font-setup-mixin.scss
Created November 22, 2016 21:18
A function/mixin set to set up all of your base font sizes in one @include statement.
//EXPONENT FUNCTION
//https://css-tricks.com/snippets/sass/power-function/
@function pow($number, $exponent) {
$value: 1;
@if $exponent > 0 {
@for $i from 1 through $exponent {
$value: $value * $number;
}
@stephenbelyea
stephenbelyea / helpers.js
Last active September 13, 2016 18:26
Load and place SVG icons within wrapper container (ES6).
// Loop context for svg icons to load.
// Wrap arg defaults to main wrapper,
// but will accept any query string.
export function setSvgIcons(wrap = "#wrap") {
let ctx = $(wrap + " [data-svg-icon]:not(.loaded)");
if (ctx.length) {
let path = window.location.origin;
for (let i = 0; i < ctx.length; i++) {
let c = ctx[i];
@bishboria
bishboria / springer-free-maths-books.md
Last active September 25, 2025 06:28
Springer made a bunch of books available for free, these were the direct links
@imjasonh
imjasonh / markdown.css
Last active September 3, 2025 22:12
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}