Skip to content

Instantly share code, notes, and snippets.

@wybiral
wybiral / noscript-tracking.go
Last active September 11, 2023 08:53
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@uangsl
uangsl / iframe-loader.js
Last active November 9, 2023 01:34
load webpage by XMLHttpRequest, and insert HTML into iframe by DOMParser. then the main page can visit iframe's context without cross-domain problem
const IFRAME_READY_MESSAGE = "IFRAME_READY";
export default {
id: null,
$el: null,
iframeBaseUrl: null,
targetDocument: document,
style:{'position':'fixed', 'top': '0', 'right':'20px', 'width':'300px', 'height':'400px'},
/***
* {id: '', url: '', iframeBaseUrl:'' , style:{}, targetDocument: null}
*/
@ryanpcmcquen
ryanpcmcquen / backup_chrome_63_saved_passwords.js
Last active April 24, 2021 11:32
DEPRECATED! Chrome now has password export built in.
// 1. Open: chrome://settings/passwords
// 2. Open Chrome developer tools (using F12 or Ctrl+Shift+i).
// 3. Run the following code in the console tab.
// 4. Copy output in a text file and save it somewhere safe!
;(() => {
const asyncForEach = (array, done, iterator) => {
let i = 0
let next = err => {
if (err) {
done(err)
@harababurel
harababurel / tellphone.sh
Last active June 17, 2024 13:37
Small script for sending notifications to phone using kde-connect.
#!/bin/bash
command -v kdeconnect-cli >/dev/null 2>&1 || { echo >&2 "kdeconnect is not installed. Aborting."; exit 1; }
if [ $# -eq 0 ]; then
echo "Usage: $0 <message>"
exit 1
fi
device=`kdeconnect-cli -a --id-only 2>/dev/null | head`