Skip to content

Instantly share code, notes, and snippets.

View JakubAndrysek's full-sized avatar

Kuba Andrýsek JakubAndrysek

View GitHub Profile
@JakubAndrysek
JakubAndrysek / limit-google-form-responses.js
Last active April 16, 2024 21:23
This Google Apps Script code will automatically close a Google Form when it reaches a maximum number of responses. It will also send an email notification to the form owner when the limit is reached.
/**
* Google Apps Script code to close a Google Form when it reaches a maximum number of responses.
* Author: Jakub Andrýsek
* Website: https://kubaandrysek.cz
* Email: email@kubaandrysek.cz
* GitHub: https://github.com/JakubAndrysek
* License: MIT
* File: https://gist.github.com/JakubAndrysek/fbcdf78f7bc91d905d22350e7cbcdb31
*/
@JakubAndrysek
JakubAndrysek / Setup PHP Xdebug on Mac M1 with PhpStorm.md
Last active April 16, 2024 19:53
Setup PHP Xdebug on Mac M1 with PhpStorm

Setup PHP Xdebug on Mac M1 with PhpStorm

  • Install PHP
  • brew install php
@JakubAndrysek
JakubAndrysek / AppsRunningMac.scpt
Last active April 16, 2024 19:50
Get JSON of running apps + paths on macOS
-- Get JSON of runnin apps + paths on macOS
-- Author: JakubAndrysek + (https://www.alfredforum.com/topic/11318-solved-how-to-load-an-applications-icon-with-applescript/?do=findComment&comment=59154)
-- Version: 1.0
-- License: MIT
-- Link: https://gist.github.com/JakubAndrysek/2f4f4de69443fc0438ddb6320caf2349
-- Description: This script lists all running non-background processes and their paths in JSON format.
tell application "System Events"
set runningProcesses to (every process whose background only is false)
@JakubAndrysek
JakubAndrysek / yabai-update.py
Last active April 16, 2024 19:51
Yabai - Configure scripting addition - automation
#!/usr/bin/env python3
# Yabai - Configure scripting addition - automation
# Author: Jakub Andrysek
# Website: https://kubaandrysek.cz
# License: MIT
# GitHub: https://github.com/JakubAndrysek
# https://github.com/koekeishiya/yabai/wiki/Installing-yabai-(latest-release)#configure-scripting-addition
import os
@JakubAndrysek
JakubAndrysek / CopyGoogleSharedDrive.gs
Last active May 29, 2024 11:02
Copying files and folders from a personal Google Drive to a Shared Google Drive (aka Team Drives) using Google Apps Script
/**
* Copying files and folders from a personal Google Drive to a Shared Google Drive (aka Team Drives) using Google Apps Script
* Author: Jakub Andrýsek + https://stackoverflow.com/users/8199076/azmol
* Website: https://kubaandrysek.cz
* Email: email@kubaandrysek.cz
* GitHub: https://github.com/JakubAndrysek
* License: MIT
* File: https://gist.github.com/JakubAndrysek/d3c16b85bf34eaca18d33df471104dd5
*/
@JakubAndrysek
JakubAndrysek / ZebraPrint-UNIX.md
Last active October 21, 2023 13:31
Add Zebra printer to UNIX + print from Inkscape / Terminal
@JakubAndrysek
JakubAndrysek / PyQt-BLE.py
Last active July 30, 2023 10:35
Gattol + HciTool
# not work during my test
import sys
from PyQt5.QtBluetooth import QBluetoothLocalDevice, QBluetoothDeviceDiscoveryAgent, QBluetoothDeviceInfo, QLowEnergyController, QBluetoothUuid, QLowEnergyService
from PyQt5.QtCore import QObject, QCoreApplication, pyqtSlot
class BLEApp(QObject):
def __init__(self, parent=None):
super(BLEApp, self).__init__(parent)
self.deviceAddress = "E5:76:86:2B:B4:F8"
@JakubAndrysek
JakubAndrysek / README.md
Last active July 27, 2023 22:34
PyBluez - latest - Ubuntu install (+ BLE install)

PyBluez - latest - Ubuntu

Install latest PyBluez - standard

Dependencies

sudo apt-get install libbluetooth-dev
sudo apt-get install bluez
@JakubAndrysek
JakubAndrysek / ValidateLinksScraping.py
Last active May 24, 2023 21:33
This script will scrape a website and save all the paths to a file.
# Description: This script will scrape a website and save all the paths to a file.
# Usage: It will also exclude any paths that end with the extensions specified in the --exclude-extensions parameter.
# It will also limit the number of links to visit per page to the number specified in the --max_links_per_page parameter.
# It could be used to test a website for broken links.
# Be careful not to overload the website with requests. You could get banned.
# Example: python ValidateLinksScraping.py https://webscraper.io/test-sites --max_links_per_page 100 --exclude-extensions pdf,jpg,png
# Author: Kuba Andrysek
# Website: https://kubaandrysek.com
# Date: 2023-05-34