Skip to content

Instantly share code, notes, and snippets.

View Vadorequest's full-sized avatar

Vadorequest Vadorequest

View GitHub Profile
@Vadorequest
Vadorequest / github_bitbucket_multiple_ssh_keys.md
Created August 22, 2023 07:10 — forked from yinzara/github_bitbucket_multiple_ssh_keys.md
Managing SSH keys and repo cloning using multiple accounts on GitHub and BitBucket

Why Multiple SSH keys?

There are numerous reasons you may need to use multiple SSH keys for accessing GitHub and BitBucket

You may use the same computer for work and personal development and need to separate your work.

When acting as a consultant, it is common to have multiple GitHub and/or BitBucket accounts depending on which client you may be working for.

You may have different projects you're working on where you would like to segregate your access.

@Vadorequest
Vadorequest / ShowInView.tsx
Created August 23, 2021 15:17
Framer Motion "ShowInView" component - Displays children when visible in the viewport
import {
domAnimation,
LazyMotion,
m as motion,
useAnimation,
} from 'framer-motion';
import { CustomDomComponent } from 'framer-motion/types/render/dom/motion-proxy';
import {
Transition,
Variant,
{
"Video tracker":[
{
"id":"rec33UwV42IIInLVD",
"fields":{
"Video name":"When to Rent Gear and When to Buy Gear",
"Writer":[
"recaZvHtOExWvtyym"
],
"Platform":"Facebook",
@Vadorequest
Vadorequest / config_github_ssh_for_CDE_on_deployment.sh
Last active December 13, 2019 15:39
Config SSH private key on Zeit or Github Actions deployment server - Allows to fetch a private repository
#!/usr/bin/env bash
# This script is meant to be triggered on "package.json:scripts:preinstall"
# Once executed, it will allow fetching a private Github repository (the GITHUB_SSH_KEY_CDE is a RSA private key, that matches a Github "Deploy key")
# See https://spectrum.chat/zeit/now/deploy-with-private-github-dependency~67f5de5b-ad7f-4ff0-afbe-c1b717cca4db
echo "Resolving deployment's origin (Zeit, GitHub Actions, AWS CodeBuild), with HOME='$HOME'"
function configure_ssh() {
echo "Configuring environment with a custom ssh key to be able to fetch private dependencies..."
@Vadorequest
Vadorequest / Add Zeit complex secret (RSA, SSH).sh
Created December 13, 2019 14:45
How to add a complex value as Zeit Now secret (RSA/SSH private key, load file as a secret)
> now secrets add github-ssh-key-my-repo -- "`< id_rsa_my_repo`"
Success! Secret github-ssh-my-repo added [539ms]
# You can now use the secret using `@github-ssh-my-repo`
# See https://github.com/zeit/now/issues/749#issuecomment-533873759
@Vadorequest
Vadorequest / ping.py
Last active March 3, 2019 22:58
Example how to ping another website from AWS Lambda with Zappa, file path is "scripts/management/commands/ping.py"
import urllib.request
from django.core.management.base import BaseCommand
class Command(BaseCommand):
"""
Example:
zappa manage staging ping
zappa manage staging "ping --address https://google.com"
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@Vadorequest
Vadorequest / stylus-best-practices.md
Last active August 5, 2018 20:35 — forked from zspecza/stylus-best-practices.md
Stylus Best Practices

Stylus Best Practices

Introduction

This is a curated set of conventions and best practices for Stylus, an expressive, dynamic, robust and advanced CSS preprocessor. Frustrated with there not being a set of conventions set in place (that could be easily found), I set forth to find out on my own.

Keybase proof

I hereby claim:

  • I am vadorequest on github.
  • I am vadorequest (https://keybase.io/vadorequest) on keybase.
  • I have a public key ASDM_qSI_wFnzKgIEi21Kb-oPSON2McSLrLhQ2gSLF6A8wo

To claim this, I am signing this object:

@Vadorequest
Vadorequest / v8_3.30.33.16-patched2_install.log
Created November 22, 2017 22:15
Failure compiling RethinkDB under Ubuntu 17.10 from source
This file has been truncated, but you can view the full file.
+ pkg_depends_env
++ pkg_depends
++ true
+ pkg_install
+ pkg_copy_src_to_build
+ mkdir -p /home/vadorequest/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build
+ cp -af /home/vadorequest/rethinkdb-2.3.6/external/v8_3.30.33.16-patched2/. /home/vadorequest/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build
+ in_dir /home/vadorequest/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build patch -fp1
+ local dir=/home/vadorequest/rethinkdb-2.3.6/build/external/v8_3.30.33.16-patched2/build
+ shift