Skip to content

Instantly share code, notes, and snippets.

View ceccocats's full-sized avatar

Francesco Gatti ceccocats

View GitHub Profile
@ceccocats
ceccocats / gdrive_download.sh
Last active October 21, 2022 20:37
Google drive download
#! /bin/bash
FILEID=$1
FILENAME=$2
wget --no-verbose --show-progress --progress=bar:force --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=$FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=$FILEID" -O $FILENAME && rm -rf /tmp/cookies.txt
@ceccocats
ceccocats / usb_relay.sh
Created April 23, 2022 14:48
command DollaTek LCUS usb relay
#! /bin/bash
stty -F /dev/ttyUSB0 9600
while [[ $# -gt 0 ]]; do
case $1 in
--on)
echo "set on"
echo -e "\xA0\x01\x01\xA2" > /dev/ttyUSB0
shift
;;
@ceccocats
ceccocats / github_runners.txt
Last active April 29, 2022 18:53
Runners github
new Runners:
- install qemu
sudo apt-get install qemu binfmt-support qemu-user-static
- install last version of git: (checkout action works better)
sudo add-apt-repository -y ppa:git-core/ppa
sudo apt update
sudo apt install git
git --version
@ceccocats
ceccocats / centralinafinale.ino
Created December 18, 2015 11:09
Arduino code for competitions lights
#include "Timer.h"
Timer t;
const int RED_R = 5;
const int YELLOW_R = 6;
const int GREEN_R = 7;
const int BEEP_R =8;
const int OUTIN_B = 14;