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
# 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 May 8, 2024 17:43
Building a react native app in WSL2
@alvr
alvr / packages.md
Last active April 14, 2024 10:51
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 April 25, 2024 06:27
Springer made a bunch of books available for free, these were the direct links
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
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;
}
@markrendle
markrendle / MITEA.license
Created March 30, 2015 10:53
The "MIT Except Apple" License
The MIT-except-Apple License (MIT-EA)
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person (except
anybody associated with Apple Inc.) obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the
Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is