Skip to content

Instantly share code, notes, and snippets.

View ThomasG77's full-sized avatar

Thomas Gratier ThomasG77

View GitHub Profile
ThomasG77 / .eslintrc.json
Last active April 18, 2022 23:24
Play with gdal.vectorTranslate in Node.js
View .eslintrc.json
"env": {
"node": true,
"es2021": true
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
View philly_sjoin.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
mmazzarolo / runtime-globals-checker.js
Last active June 8, 2023 14:27
Find what JavaScript variables are leaking into the global `window` object at runtime (see:
View runtime-globals-checker.js
* RuntimeGlobalsChecker
* You can use this utility to quickly check what variables have been added (or
* leaked) to the global window object at runtime (by JavaScript code).
* By running this code, the globals checker itself is attached as a singleton
* to the window object as "__runtimeGlobalsChecker__".
* You can check the runtime globals programmatically at any time by invoking
* "window.__runtimeGlobalsChecker__.getRuntimeGlobals()".
DavidWells / javascript-proxy-as-rest-client.js
Last active September 2, 2023 12:24
Using a javascript proxy as low code REST client
View javascript-proxy-as-rest-client.js
/* Using a JavaScript proxy for a super low code REST client */
// via
// also see
// also see
// also see
// and
const createApi = (url) => {
return new Proxy({}, {
get(target, key) {
import re
import csv
import ssl
import urllib.request
ssl._create_default_https_context = ssl._create_unverified_context
baseUrl = ''
url_page = baseUrl + 'documentation/services'
davidbgk / .zshrc
Created December 15, 2021 15:09
Example of Python aliases + reimplementation of `cd` to auto de/activate the current virtualenv
View .zshrc
# aliases
alias -g ll='ls -al'
alias -g subl='open -a "Sublime Text"'
alias server='python3 -m http.server 8000 --bind'
alias rmvenv='deactivate && rm -rf venv/'
alias venv='python3 -m venv venv'
alias activate='source venv/bin/activate'
alias pipupgrade='python3 -m pip install --upgrade pip'
alias requirements='python3 -m pip install -r requirements.txt'
yokawasa /
Last active September 6, 2023 08:14
ghcr (GitHub Container Registry)
mdouchin /
Last active October 6, 2021 08:34
Audit the QGIS projects found in a directory and it sub-directories, and export a CSV file containing the fetched information
# -*- coding: utf-8 -*-
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
0xabad1dea /
Last active September 11, 2023 10:21
Risk Assessment of GitHub Copilot

Risk Assessment of GitHub Copilot

0xabad1dea, July 2021

this is a rough draft and may be updated with more examples

GitHub was kind enough to grant me swift access to the Copilot test phase despite me @'ing them several hundred times about ICE. I would like to examine it not in terms of productivity, but security. How risky is it to allow an AI to write some or all of your code?

Ultimately, a human being must take responsibility for every line of code that is committed. AI should not be used for "responsibility washing." However, Copilot is a tool, and workers need their tools to be reliable. A carpenter doesn't have to