Skip to content

Instantly share code, notes, and snippets.

View franciscop's full-sized avatar
🙈
Ahhhh bugs!

Francisco Presencia franciscop

🙈
Ahhhh bugs!
View GitHub Profile
@franciscop
franciscop / FRANCISCO_CLA
Last active May 23, 2017 08:07 — forked from CLAassistant/SAP_CLA
SAP Individual Contributor License Agreement
###FRANCISCO Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Francisco IO LTD or its affiliates (“FRANCISCO”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to FRANCISCO in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact [email protected].
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to FRANCISCO a non-exclusiv
@franciscop
franciscop / app.js
Created August 21, 2021 21:46
Electron bug
const { app, BrowserWindow } = require("electron");
app.on("ready", () => {
const child = new BrowserWindow({ frame: false });
child.loadURL("https://github.com");
child.once("ready-to-show", () => {
child.show();
});
});
@franciscop
franciscop / trainlines.js
Last active September 17, 2021 22:46
Japan train lines Mapbox+Leaflet
const map = ...;
const accessToken = "...";
// Add train lines (Shinkansen, metro, JR, etc) to Mapbox using LeafLet for a more
// accurate representation of Japan and Tokyo
// Using the layer mapbox.transit-v2 for trains and some custom styles
const trains =
"https://api.mapbox.com/v4/mapbox.transit-v2/{z}/{x}/{y}.vector.pbf?access_token={accessToken}";
const transit_line = (properties, zoom) => {
const isShinkansen = properties.mode === "high_speed_rail";
@franciscop
franciscop / gandi_net_cheap.js
Created October 27, 2022 15:19
Find the cheapest TLD domains with Gandi.net
// Search Gandi.net for the cheapest domains
// Make sure you have expanded the list in gandi.net search to the end!
(() => {
const RESULTS = 10;
const ROW_SEL = '.ListCellGroup-root_29bXw';
const DOMAIN_SEL = '.FqdnCell-textBreak__elahz';
const PRICE_SMALL = '.Text-align-end_3rH75';
const PRICE_LARGE = '.PriceText-root__lJT6S';
const list = $$(ROW_SEL).map(it => {
@franciscop
franciscop / francisco.zsh-theme
Last active October 9, 2023 15:13
Theme for ZSH
function git_prompt_info() {
# If we are on a folder not tracked by git, get out.
# Otherwise, check for hide-info at global and local repository level
if ! __git_prompt_git rev-parse --git-dir &> /dev/null \
|| [[ "$(__git_prompt_git config --get oh-my-zsh.hide-info 2>/dev/null)" == 1 ]]; then
return 0
fi
local ref
ref=$(__git_prompt_git symbolic-ref --short HEAD 2> /dev/null) \