jq is useful to slice, filter, map and transform structured json data.
brew install jq
| import sys,os | |
| import curses | |
| def draw_menu(stdscr): | |
| k = 0 | |
| cursor_x = 0 | |
| cursor_y = 0 | |
| # Clear and refresh the screen for a blank canvas | |
| stdscr.clear() |
| KeepAlive(ColabWinTitle, Interval){ | |
| Loop | |
| { | |
| Sleep, 1000 * 3 | |
| if WinExist(ColabWinTitle) | |
| { | |
| WinActivate ; Automatically uses the window found above. | |
| WinMaximize ; same | |
| Sleep, 2000 | |
| MouseClick, left, 1750, 250, 1, 30 |
| InputBox, ColabFileName, Colab Keep Alive Script, Enter the Google Colab filename | |
| ColabWinTitle := ColabFileName . " - Colaboratory - Google Chrome" | |
| if WinExist(ColabWinTitle){ | |
| WinActivate | |
| InputBox, Interval, Keep Alive : %ColabWinTitle%, Enter an interval (in minutes) to emulate mouse and keyboard behaviour : | |
| if Interval is not integer | |
| { | |
| MsgBox, , Halt : Bad Type, Enter an Integer for the Interval | |
| Return | |
| } |
| #!/usr/bin/env python3 | |
| """ | |
| License: MIT License | |
| Copyright (c) 2023 Miel Donkers | |
| Very simple HTTP server in python for logging requests | |
| Usage:: | |
| ./server.py [<port>] | |
| """ | |
| from http.server import BaseHTTPRequestHandler, HTTPServer |
| #!/bin/bash | |
| PUBLIC_IP4_IFACE=eth2 | |
| LISTEN_IFACE=${PUBLIC_IP4_IFACE} | |
| listen_address=$(ip -f inet addr show dev ${LISTEN_IFACE} | grep -Po 'inet \K[\d.]+') | |
| listen_port=${1} | |
| target_host=${2} | |
| target_port=${3} |
| curl -s https://api.github.com/users/milanboers/repos | grep \"clone_url\" | awk '{print $2}' | sed -e 's/"//g' -e 's/,//g' | xargs -n1 git clone |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <netinet/tcp.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <netinet/in.h> |