Skip to content

Instantly share code, notes, and snippets.

View tappoz's full-sized avatar

Alessio Gottardo tappoz

View GitHub Profile
@ML-engineer
ML-engineer / duckdb_bq_storage_api.py
Created July 4, 2022 22:08
Read BQ table to DuckDB directly from storage read api
import duckdb
from google.cloud import bigquery
bqclient = bigquery.Client()
table = bigquery.TableReference.from_string(
"bigquery-public-data.utility_us.country_code_iso"
)
rows = bqclient.list_rows(table)
country_code_iso = rows.to_arrow(create_bqstorage_client=True)
cursor = duckdb.connect()
@alikrc
alikrc / DbeaverDarkThemeHow.md
Last active October 8, 2024 08:25
dbeaver dark theme setup
@jaapie
jaapie / update-ads
Last active October 23, 2022 23:29
A simple bash script for Debian-based systems that downloads the latest version of Azure Data Studio and installs it. Requires the html-xml-utils package to be installed
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "error: you must be root to run this script"
exit
fi
FILENAME=/tmp/azuredatastudio-latest.deb
LINK=$(curl -s "https://learn.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver16" | hxnormalize -x | hxselect 'table a[data-linktype="external"]' | sed -r 's/(.*)(<a[^>]*>.deb<\/a>)(.*)/\2/' | sed -r 's/(.*)href="([^"]*)"(.*)/\2/')
@hermanbanken
hermanbanken / kustomize_vars.md
Created November 22, 2020 13:11
Kustomize Vars example

This was initially posted in an kubernetes-sigs/kustomize issue.

We are using Kustomize's vars feature. Initially we didn't understand how to use it for our purpose, but it is a 100% fit. One example is our Ingress resource, which looks like this:

# file: base/ingress.yaml
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: services
@amusarra
amusarra / BIT4ID_miniLector_AIR_NFC_v3.patch
Last active February 10, 2022 09:15
BIT4ID_miniLector_AIR_NFC_v3.patch
diff --git a/readers/supported_readers.txt b/readers/supported_readers.txt
index 5601ded..bfee1c2 100644
--- a/readers/supported_readers.txt
+++ b/readers/supported_readers.txt
@@ -237,6 +237,7 @@
0x25DD:0x3111:Bit4id miniLector
0x25DD:0x3211:Bit4id miniLector AIR EVO
0x25DD:0xB001:Bit4id miniLector Blue
+0x25DD:0x3403:BIT4ID miniLector AIR NFC v3
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active November 17, 2024 17:23
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@ryansutc
ryansutc / PIP Cheatsheet.md
Last active September 13, 2022 11:47
A Quick Cheatsheet for Python PIP and pipenv Commands

Python PIP Cheatsheet


Creating/Starting a Project

get dependencies for an existing repo in your virtual env:

pipenv install
@1st1
1st1 / example.py
Last active October 20, 2024 19:56
asyncio queues example
import asyncio
import random
import time
async def worker(name, queue):
while True:
# Get a "work item" out of the queue.
sleep_for = await queue.get()
@Ambroos
Ambroos / WARNING.md
Last active October 13, 2024 13:01
Remove SentinelOne agent from Mac. Because honestly, it doesn't seem to do anything at all. Run as root, best is to do this from a recovery mode, single user mode with writeable filesystem, ...

USE AT OWN RISK

This was only tested on a 'partial' SentinelOne installation on the High Sierra beta, where SentinelOne was never allowed to enable it's kernel extension. (Some things failed while I was messing around with OS betas.)

This script is most likely outdated.

A lot happens in 2+ years, at this point there's a good chance this script will do more harm than good. Read the comments before using!

@braian87b
braian87b / openwrt-lede-openvpn-client.md
Last active April 2, 2021 09:33
Setting an OpenWrt / LEDE Based Router as OpenVPN Client

These instructions should work for Streisand as well for others VPN providers (Streisand is a Software that automatically configures a VPS online server with OpenVPN and other VPN/Proxy Softwares in order to have a private VPN Server)

These instructions are for getting an OpenWrt Based Router working as OpenVPN Client (should work for LEDE, Gargoyle and another distributions). Computers connected to Lan Ports of the OpenWrt Router will navigate through the Internet connection of the OpenVPN Server (in this case the Streisand one previously set up) you need a working Router with OpenWrt based firmware flashed on it (LEDE or eko.one.pl could also work) steps works well on Chaos Calmer 15.05 or 15.05.1.

  1. You need to telnet 192.168.1.1 (OpenWrt Router) and set up a password using passwd You can skip this if you already have a password and can connect using ssh.