Skip to content

Instantly share code, notes, and snippets.

View MINORITYmaN's full-sized avatar

Stefano Kocka MINORITYmaN

  • Europe
View GitHub Profile
@tangentstorm
tangentstorm / sh.mjs
Last active May 5, 2024 02:58
shorthand javascript
// sh.mjs: javascript shorthand
// array helpers (apl/j/k)
export const id=x=>x
export const af=(n,x)=>Array(n).fill(x) // TODO: make this 'afl' or 'fil' (aa?)
export const ii=(n,f)=>{for(let i=0;i<n;i++)f(i)}
export const im=(n,f)=>af(n,0).map((_,i)=>f(i))
export const ia=(n,f)=>im(n,id)
export const at=(a,ixs)=>ixs.map(i=>a[i])
export const io=(xs,ys)=>ys.map([].indexOf.bind(xs))
@YankeeTube
YankeeTube / index.html
Last active October 22, 2022 08:18
So Very Fast NSFWJS on TFJS WASM + Web Worker
<html>
<head></head>
<body>
<div>
<input type="file" id="file-input" />
</div>
</body>
<script>
const worker = new Worker('worker.js');
@rminderhoud
rminderhoud / powershell-web-server.ps1
Last active May 4, 2024 14:02 — forked from 19WAS85/powershell-web-server.ps1
A simple web server built with powershell.
# This is a super **SIMPLE** example of how to create a very basic powershell webserver
# 2019-05-18 UPDATE — Created by me and and evalued by @jakobii and the comunity.
# Http Server
$http = [System.Net.HttpListener]::new()
# Hostname and port to listen on
$http.Prefixes.Add("http://localhost:8080/")
# Start the Http Server
@bellbind
bellbind / index.html
Last active January 17, 2024 14:14
[chrome][android] BarcodeDetector example
<!doctype html>
<html>
<head>
<script type="module">
// WICG Shape Detection API
// - https://wicg.github.io/shape-detection-api/
try {
const start = document.getElementById("start");
const video = document.getElementById("video");
const result = document.getElementById("result");
@rob89m
rob89m / Remove-ItemOnReboot.ps1
Last active November 29, 2021 09:30
Remove-ItemOnReboot #Powershell #Registry #Delete
<#
.DESCRIPTION
Adds defined item to the PendingFileRenameOperations value in Registry to be deleted on next reboot.
.EXAMPLE
If item to be removed is a file
Remove-ItemOnReboot -Item "C:\Temp\image.wim"
If item to be removed is a directory
Remove-ItemOnReboot -Item "C:\Temp\"
@jakobii
jakobii / HTTPServer.ps1
Last active May 4, 2024 14:02
A Basic Powershell Webserver
# You Should be able to Copy and Paste this into a powershell terminal and it should just work.
# To end the loop you have to kill the powershell terminal. ctrl-c wont work :/
# Http Server
$http = [System.Net.HttpListener]::new()
# Hostname and port to listen on
$http.Prefixes.Add("http://localhost:8080/")
@esquinas
esquinas / google-sheet-visibility.gs
Last active January 3, 2023 18:54
Check visibility of hidden rows and columns in Google Spreadsheet App Script
/*
USAGE EXAMPLES:
Is the tenth row hidden?
> isRowHidden(sheet.getRange('B10'))
Is column B hidden?
> isColumnHidden(sheet.getRange('B10'))
Is cell B10 visible? (not in a hidden row and/or column)
@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active May 7, 2024 05:33
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@slaFFik
slaFFik / wpms-smtp-disable-ssl-verify.php
Last active January 23, 2024 18:35
WP Mail SMTP: when using SMTP mailer - disable SSL verify on PHP 5.6+
<?php
add_filter('wp_mail_smtp_custom_options', function( $phpmailer ) {
$phpmailer->SMTPOptions = array(
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);

Google Query String Parameters

Google Search

Query:

http://...

| URL Parameter | Accepted Values | Description |