Skip to content

Instantly share code, notes, and snippets.

View tiborepcek's full-sized avatar

Tibor Repček tiborepcek

View GitHub Profile
@tiborepcek
tiborepcek / SmartEmailing-get_number_of_contacts_in_a_list.php
Created November 28, 2021 07:25
This PHP script gets number of contats in a list of SmartEmailing.cz using their API.
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="expires" content="mon, 27 sep 2010 14:30:00 GMT" />
@tiborepcek
tiborepcek / write_this_folder_to_user_path_env.au3
Last active February 4, 2022 12:28
This script writes the path of its folder to user PATH environment (HKEY_CURRENT_USER\Environment - Path). First it checks, if the path exists, and if not, then gives the option to write it.
#cs
write_this_folder_to_user_path_env.au3 | version 1.0 | written in AutoIt 3
Description: This script writes the path of its folder to user PATH environment
(HKEY_CURRENT_USER\Environment - Path). First it checks, if the path exists,
and if not, then gives the option to write it.
Author: Tibor Repček
Web: https://gist.github.com/tiborepcek/be334bae9a1851796df37626b8c2c57b
#ce
$currentUserPaths = RegRead("HKEY_CURRENT_USER\Environment", "Path")
@tiborepcek
tiborepcek / get_plain_text_from_system_clipboard.au3
Last active November 27, 2019 20:23
Get plain text only (without formatting and pictures) from system clipboard of Windows OS.
#NoTrayIcon
#include <Clipboard.au3>
MsgBox(0, "", StringStripWS(_ClipBoard_GetData($CF_UNICODETEXT), 8))
#NoTrayIcon
#include <Array.au3>
$fileCSV = @ScriptDir & "\test.csv"
$fileCSVinArray = FileReadToArray($fileCSV)
$fileCSVinString = _ArrayToString($fileCSVinArray, @CRLF)
$fileCSVinString = StringStripWS($fileCSVinString, 4) ;remove double (or more) spaces between words
@tiborepcek
tiborepcek / fapi-disabled_note.js
Created May 10, 2018 07:11
Add a note to a FAPI form (fapi.cz) and disable note field edit. Place the code after the FAPI form.
<script>
document.getElementById('frm-notes').disabled = true;
document.getElementById('frm-notes').value = 'text of a note';
</script>
@tiborepcek
tiborepcek / auto_dl_unzip.au3
Last active February 26, 2017 20:09
Simple AutoIt 3 script to download ZIP file from HTTP(S) thanks to free open source util curl and to automatically unzip it thanks to free open source util 7za.
$settings_file = @ScriptDir & "\settings.ini"
$url = IniRead($settings_file, "auto-dl-unzip", "url", "default")
$output_file = StringSplit($url, "/")
$output_file = $output_file[$output_file[0]]
RunWait(@ScriptDir & "\curl.exe -o " & $output_file & " " & $url, @DesktopDir)
RunWait(@ScriptDir & "\7za.exe x " & $output_file, @DesktopDir)