Skip to content

Instantly share code, notes, and snippets.

View goeko's full-sized avatar
🎯
Focusing

Gökhan Karaca goeko

🎯
Focusing
View GitHub Profile
# Zsh oder Bash: source ~/.digx
function digx() {
################################################
# 1) Hilfefunktion
################################################
show_help() {
echo "digx - DNS-Abfrage (kompakte Ausgabe, kein Debug)"
echo
@goeko
goeko / gist:8610f855b98bd8164ba972084a199ff0
Last active November 26, 2024 22:23
base64copy from file or -t=text and output text or -o|--output=html and -c|--compress=zip|imagemagic
#!/bin/bash
base64copy() {
local input=""
local output="text"
local mimetype="text/plain"
local base64data
local is_text_input=0
local string_only=0 # Flag für die reine String-Ausgabe
local compression_level=0 # Kompressionslevel, Standard ist 0 (keine Kompression)
@goeko
goeko / gist:b9b5dc6c59098d712f9f3fbd1a8b438d
Created November 26, 2024 21:54
base64copy from file or -t=text and output text or -o=html
#!/bin/bash
base64copy() {
local input=""
local output="text"
local mimetype="text/plain"
local base64data
local is_text_input=0
while [[ "$#" -gt 0 ]]; do
@goeko
goeko / bookmarklet_multicopy.txt
Last active November 3, 2024 20:49
Bookmarklet: MultiCopy Text On Page
javascript:(function() {
var storageKey = 'text_storage'; /* Schlüssel für Textspeicher */
var currentIndex = -1; /* Index initial auf -1 setzen, um den gesamten Inhalt anzuzeigen */
function loadStorage() {
var storedData = localStorage.getItem(storageKey);
return storedData ? storedData.split('||') : []; /* Lädt gespeicherte Daten beim Start */
}
var storage = loadStorage(); /* Speicher initialisieren */
@goeko
goeko / gist:4ca63cc464ce8ac4a7c62535f40ccef1
Created March 4, 2024 23:36
makeNonTransparentAreasWhite | makeNonTransparentWhiteAreasTransparent | getFirstpixelesColorAndMakeNonTransparentAreasTransparent
function makeNonTransparentAreasWhite(imageElement) {
const canvas = document.createElement('canvas');
const ctx = canvas.getContext('2d');
canvas.width = imageElement.width;
canvas.height = imageElement.height;
ctx.drawImage(imageElement, 0, 0);
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
const data = imageData.data;
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Vue.js Financial Calculator</title>
<script src="https://cdn.jsdelivr.net/npm/vue@2"></script>
</head>
<style>
::root {
--highlight-font-size: 1.2em;
javascript:(function() {
var searchEngines = [
{ url: 'https://duckduckgo.com/?q=', param: 'q' },
{ url: 'https://www.google.de/search?q=', param: 'q' },
{ url: 'https://www.bing.com/search?q=', param: 'q' },
{ url: 'https://search.yahoo.com/search?p=', param: 'p' },
{ url: 'https://www.ecosia.org/search?q=', param: 'q' },
{ url: 'https://www.qwant.com/?q=', param: 'q' },
{ url: 'https://www.startpage.com/do/dsearch?query=', param: 'query' },
{ url: 'https://metager.de/meta/meta.ger3?eingabe=', param: 'eingabe' },
javascript:(function() {
var tooltipElements = document.querySelectorAll('[data-tooltip-template="web.FieldTooltip"]');
if (!tooltipElements || tooltipElements.length === 0) {
alertTooltips('Die Tooltipelemente wurden nicht gefunden.');
return;
}
var alertsContainer = document.getElementById('alertTooltipsContainer');
if (!alertsContainer || alertsContainer === null) {
alertsContainer = document.createElement('div');
javascript:(function() {
var searchEngines = [
{ url: 'https://duckduckgo.com/?q=', param: 'q' },
{ url: 'https://www.google.de/search?q=', param: 'q' },
{ url: 'https://www.bing.com/search?q=', param: 'q' },
{ url: 'https://search.yahoo.com/search?p=', param: 'p' },
{ url: 'https://www.ecosia.org/search?q=', param: 'q' },
{ url: 'https://www.qwant.com/?q=', param: 'q' },
{ url: 'https://www.startpage.com/do/dsearch?query=', param: 'query' },
{ url: 'https://metager.de/meta/meta.ger3?eingabe=', param: 'eingabe' },
/**
* Setup images sprite having high resolution variant for retina displays.
*
* It will create class names for all available icons.
*
* This uses custom function to prefix selectors from array. To get it working you will need to include following snippet in your config.rb
*
* module Sass::Script::Functions
* def prefix_each(array, prefix)
* return Sass::Script::String.new array.to_a.map{|item| prefix.value + item.value}.join(", ")