Skip to content

Instantly share code, notes, and snippets.

@paucoma
paucoma / ICS Import.gs
Last active October 7, 2023 22:33 — forked from tomjaimz/ICS Import.gs
Google App Script code to import events from a Calendar (.ics) file into Google Sheets.
function onOpen() {
SpreadsheetApp.getUi()
.createAddonMenu()
.addItem('Upload', 'upload')
.addToUi();
}
function upload() {
const hs = HtmlService.createHtmlOutput(
'<form><input type="file" name="file" onchange="var reader = new FileReader(); reader.onloadend = (e) => google.script.run.withSuccessHandler(google.script.host.close).importICS(e.target.result); reader.readAsText(this.parentNode.file.files[0]);"></form>'
@paucoma
paucoma / sub2vcd.py
Created July 28, 2022 18:15
Python Script to convert Flipper RAW .sub file to a Basic VCD Value Change Dump format
#!/usr/bin/env python
# Flipper RAW .sub format
#
# Having a look at some of the code in lib/subghz/protocols/raw.c
# - Decoded data is stored as a line starting with the text "Raw_Data: " followed by space delimited integers.
# - Each line stores a maximum number of integers limited to SUBGHZ_DOWNLOAD_MAX_SIZE ,defined as 512. Then a new line is written.
# - The sign of each integer represents a decoded signal logic level, positive / negative , logic level 1 / 0
# - The absolute value of each integer represents the signal level duration. I am guessing this is in micro-seconds
@paucoma
paucoma / TLEN.LSP
Last active December 13, 2023 11:19
Autocad Lisp Script : TLEN.lsp (Total LENgth of selected objects)
;|
Source:
- [Forum Conversation](https://forums.autodesk.com/t5/autocad-forum/how-to-calculate-the-total-length-of-multiple-lines/td-p/5120514)
- [Link with actual code](http://web.archive.org/web/20201112011622/http://www.turvill.com/t2/free_stuff/tlen.lsp)
Instructions:
- Simply copy/paste (CTRL+V) ALL the code, (defun... ...), into your command line and press Enter.
- type TLEN into the command line and follow the command prompt (select the objects)
|;
@paucoma
paucoma / toPDF.sh
Last active February 23, 2021 17:06
Nemo Filemanager script to convert image to pdf with img2pdf with single or multiple file arguments
#!/bin/bash
# Description: This Nemo script uses img2pdf with single or multiple file arguments.
# script location: ~/.local/share/nemo/scripts/
# Resources:
# [img2pdf Homepage](https://gitlab.mister-muffin.de/josch/img2pdf)
# [img2pdf mirror on github](https://github.com/josch/img2pdf)
# Tags: img2pdf nemo-filemanager nemo-script
#arguments passed to img2pdf
myoptions="--pagesize A4 --fit shrink"
@paucoma
paucoma / Contract Killer 3.md
Created March 3, 2020 12:58 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@paucoma
paucoma / TinyTaskCfgMod.c
Created November 18, 2018 22:55
Tiny Task Configuration File Modifier
/*
Deciphering TinyTask Recording Format after a bit of trial and error I found and used the following
*/
#include<stdio.h>
/* Our structure
- 0002 0000 7906 0000 4501 0000 dd0a 9400 7607 0b00
- 20 bytes in length
- interpreted as shorts, when we read it with fread, bytes get reordered
- 0200 0000 0679 0000 0145 0000 0add 0094 0776 000b
*/
@paucoma
paucoma / est_population.py
Last active February 20, 2020 16:38
Python Script to simulate Population Estimation using Capture Recapture Method
# Script to simulate Population Estimation function by paui
# Inspired to investigate after watching Matts (standupmaths) video:
# How to estimate a population using statisticians
# https://www.youtube.com/watch?v=MTmnVBJ9gCI
#
# Capture-Recapture Method
# Single-Shot version
# eN - population estimate
# M - number of marked samples before re-capture
# C - recapture sample size
@paucoma
paucoma / 180919 MXE Build Failures stdout
Last active September 19, 2018 22:21
180919 mxe Failed build log
[download] aubio-0.4.2.tar.bz2
[build] aubio i686-w64-mingw32.static
Failed to build package aubio for target i686-w64-mingw32.static!
------------------------------------------------------------
-> task in 'lib_objects' failed (exit status 1):
{task 140560222801104: c source_avcodec.c -> source_avcodec.c.1.o}
['i686-w64-mingw32.static-gcc', '-g', '-Wall', '-Wextra', '-I/opt/mxe/tmp-aubio-i686-w64-mingw32.static/aubio-0.4.2/build/src', '-I/opt/mxe/tmp-aubio-i686-w64-mingw32.static/aubio-0.4.2/src', '-DAUBIO_PREFIX="/opt/mxe/usr/i686-w64-mingw32.static"', '-DPACKAGE="aubio"', '-DHAVE_FFTW3F=1', '-DHAVE_SAMPLERATE=1', '-DHAVE_SNDFILE=1', '-DHAVE_AVCODEC=1', '-DHAVE_AVFORMAT=1', '-DHAVE_AVRESAMPLE=1', '-DHAVE_AVUTIL=1', '../src/io/source_avcodec.c', '-c', '-o', '/opt/mxe/tmp-aubio-i686-w64-mingw32.static/aubio-0.4.2/build/src/io/source_avcodec.c.1.o']
Makefile:792: recipe for target 'build-only-aubio_i686-w64-mingw32.static' failed
make[1]: *** [build-only-aubio_i686-w64-mingw32.sta
@paucoma
paucoma / WindowsContextMenuMod.rst
Last active March 9, 2024 14:06
Windows Extension Specific Context Menu Modification

Windows context Menu Handlers.

-----Considerations -----

In general, HKEY_CLASSES_ROOT is intended to be read from but not written to, although one can write to it.

@paucoma
paucoma / gglCalEventsOnSpreadSheet.gs
Last active March 7, 2023 21:42
Script to read Google Calendar Events and Count total Hours
const gblFrom = {
year : 2020 ,
month : 3,
day : 29,
hour : 0
};
const gblTo = {
year : 2020 ,
month : 8,
day : 1,