Skip to content

Instantly share code, notes, and snippets.

View alex-spataru's full-sized avatar
👣
Focusing on my life, I might be slow to respond on FOSS projects.

Alex Spataru alex-spataru

👣
Focusing on my life, I might be slow to respond on FOSS projects.
View GitHub Profile
@alex-spataru
alex-spataru / android-bootloader-unlock.py
Last active December 22, 2023 20:08
Brute-force OEM code/password guesser for Android phones
#
# Based on https://github.com/haexhub/huaweiBootloaderHack
#
# Usage:
# python android-bootloader-unlock.py <YOUR_IMEI_CODE>
#
# Please enable USB debugging on your phone before using this
# tool, hope it helps you :)
#
@alex-spataru
alex-spataru / add_drop_shadow.py
Created October 17, 2023 18:22
Python script to add drop shadows to *.png files in a directory
#
# Copyright (c) 2023 Alex Spataru <https://github.com/alex-spataru>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@alex-spataru
alex-spataru / DatePicker.qml
Created October 16, 2023 07:22
Classical Qt Quick Controls 1.0 Calendar widget for Qt 6
/*
* Copyright (c) 2023 Alex Spataru <https://github.com/alex-spataru>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
@alex-spataru
alex-spataru / tone_generator.py
Last active October 13, 2023 15:17
Python script to generate WAV "beep" tones with different musical notes & octaves, includes a simple ADSR & fader filter
#
# File: tone_generator.py
# Author: Alex Spataru <https://github.com/alex-spataru>
# Date: 2023-Oct-12
#
# Description:
# Python script to generate WAV "beep" tones with different
# musical notes & octaves, includes a simple ADSR envelope
# and a fade in / fade out filter to avoid blowing up
# your innocent laptop speakers.
@alex-spataru
alex-spataru / deploy-qt-app.yml
Last active January 6, 2024 06:57
Compile & generate build artifacts for Qt Projects with GitHub Actions
#--------------------------------------------------------------------------------
# Workflow configuration
#--------------------------------------------------------------------------------
name: Build
on:
push: # Run on push
pull_request: # Run on pull-request
#--------------------------------------------------------------------------------
@alex-spataru
alex-spataru / A QML Material Drawer.md
Last active August 20, 2023 07:12
Implementation of a simple and clean Material drawer for your QtQuick/QML applications

Description

This gist allows you to implement a material drawer easily for your projects. It consists of three files:

  • PageDrawer.qml The drawer itself, with an icon viewer, a list view and some hacks to execute the actions/functions assigned to each drawer item
  • DrawerItem.qml Which can act as an action, a spacer, a separator or a link
  • SvgImage.qml Ugly hack to make SVG images look crisp and smooth on HDPI screens

Licence

This code is released under the WTFPL, for more information click here.

@alex-spataru
alex-spataru / Opening files using system events in Qt
Last active August 29, 2015 14:14
Open files from system request on Mac [Qt]
#include <QEvent>
#include <QApplication>
// Create a subclass of QApplication so that we can customize what we
// do when the operating system sends us an event (such as opening a file)
class MyApp : public QApplication
{
Q_OBJECT
@alex-spataru
alex-spataru / Notification badge in QML
Last active August 29, 2015 14:03
Notification badge in QML
// Copyright (c) 2013-2014 Alex Spataru <alex.racotta@gmail.com>
// This file is distributed under the GNU GPL 3.0 License
import QtQuick 2.2
//-----------------------------------------------------------------------------------//
// Description: this control allows you to show a notification similar to those //
// in most mobile devices. This control anchors automatically to its parent. //
// The \c text parameter is used to display the notification. //
// The control is automatically resized to fit the notification inside a single line.//