Skip to content

Instantly share code, notes, and snippets.

View nSimonFR's full-sized avatar
👩‍🎨
PoC-ing stuff !

nSimon (Nicolas) nSimonFR

👩‍🎨
PoC-ing stuff !
View GitHub Profile
@nSimonFR
nSimonFR / secrets.sh
Last active December 2, 2023 16:18
Generate secrets.json from a .env and uploads them to wrangler via bulk
#!/bin/sh
##
# Exports .env to .env.json and sends them to wrangler secret
# Generated by ChatGPT (But heavily human-corrected, it's almost as bad at regex as humans)
#
# Assumes you use gnused, warning for macOS users !
#
# MIT License - nSimon.fr
##
// MOVED TO https://github.com/nSimonFR/linear-EPIC/
import (\{?(?:.|\n)*?\}?) from (".*");
const $1 = require($2);
export (\{?(?:.|\n)*?\}?);
module.exports = $1;
@nSimonFR
nSimonFR / envrcToMarkdown.js
Last active August 6, 2020 14:04
Generate a markdown table from a .envrc file.
/**
* Generate a markdown table from a .envrc
* FIXME EDIT YOUR VALUES BEFORE COMMITING
*/
/* eslint-disable no-console */
const { exec } = require("child_process");
// TODO Configurable variables
const ENV_FOLDER = "~/MyDocuments/TRUSK/trusk-infra/env/development/"; // with the trailing /
@nSimonFR
nSimonFR / dc.zsh
Last active May 7, 2020 15:54
Aliases for Docker-Compose for submodule-based monorepoes / microservices architecture
# Compose
alias dc='docker-compose'
alias de='docker exec -it'
alias ds='docker stats --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}"'
alias dcu='run_command_using_basedir_as_param "at_end" "dc up -d" && dclft'
alias dcud='run_command_using_basedir_as_param "at_end" "dc up -d"'
alias dcub='run_command_using_basedir_as_param "at_end" "dc up --build"'
alias dcudb='run_command_using_basedir_as_param "at_end" "dc up -d --build"'
alias dcbnc='run_command_using_basedir_as_param "at_end" "dc build --no-cache"'
alias dcubnc='dcbnc && dcud && dclft'
@nSimonFR
nSimonFR / git_link_exclude_for_submodules.sh
Last active September 24, 2020 09:30
Creates a symlink of your git info/exclude file in your git project across your submodules.
@nSimonFR
nSimonFR / savesync.py
Created December 30, 2018 15:55
An attempt to sync .sav files between devices and emulators using google drive
#!/usr/bin/env python3
# Savesync - Sync saves between devices
import os
from subprocess import DEVNULL, STDOUT, check_call
from googleapiclient.discovery import build
from googleapiclient.http import MediaIoBaseDownload, MediaFileUpload
from httplib2 import Http
from oauth2client import file, client, tools
@nSimonFR
nSimonFR / traveltime.sh
Last active November 27, 2018 11:29
Get commute time between two points (In minutes)
#!/bin/bash
# traveltime.sh - Get commute time between two points (In minutes)
#
# You will need:
# - "Location Helper", available from the App Store
# - A Citymapper API Key, available at https://citymapper.3scale.net/
#
# Usage:
# ./citymapper.sh END_COORD START_COORD
h scroll left
j scroll down
k scroll up
l scroll right
gg scroll to top of the page
G scroll to bottom of the page
f activate link hints mode to open in current tab
F activate link hints mode to open in new tab
r reload

Keybase proof

I hereby claim:

  • I am nsimonfr on github.
  • I am nsimon (https://keybase.io/nsimon) on keybase.
  • I have a public key ASBWXNolUsaJFfNLf2GuUSKTCgtiP7AMn-JfpGGsz_R5bAo

To claim this, I am signing this object: