Skip to content

Instantly share code, notes, and snippets.

View apotitech's full-sized avatar
🏠
Working from home

Lionel Tchami apotitech

🏠
Working from home
View GitHub Profile

Playbook: Visualizing the History of a Git Repository with Gource

Overview

This playbook provides guidance on using Gource to visualize the history of a Git repository. It covers installing Gource, generating visualizations, customizing visual output, and sharing the visualization.

Prerequisites

@apotitech
apotitech / data_eng_challenege.md
Created February 8, 2024 00:06 — forked from jwprillaman/data_eng_challenege.md
Data Engineer Challenge Prompt

Data Engineer - Coding Challenge

This coding exercise is an opportunity for you to show us how you break down product requirements into actual code, as well as to demonstrate quality, coding style, experience, and creativity in problem-solving. This task is designed to be relevant to the kind of work an engineer in this role does at Bitly. You should not expect there to be any gotchas.

For the purpose of this challenge, we will be working with CSV and JSON files rather than database tables/streams/APIs but the following will be a representation of data similar to what you would be seeing on a daily basis as an engineer at Bitly.

This unzipped directory contains the data that you will be using for this challenge:

  • encodes.csv contains information on shortened links or "encodes" to represent existing data infrastructure.
  • decodes.json contains raw data on bitlink clicks as newline-separated JSON to represent a large data stream.
@apotitech
apotitech / challenge.md
Created February 8, 2024 00:06 — forked from mratzloff/challenge.md
API Coding Challenge

REQUIREMENTS

This coding exercise is an opportunity for you to show us how you break down product requirements into actual code, as well as to demonstrate quality, coding style, experience, and creativity in problem solving. It will also introduce you to the Bitly API and expose you to some of the functionality the back-end team develops on a daily basis. This task is designed to be relevant to the kind of work backend engineers at Bitly do. You should not expect there to be any gotchas.

Bitly Access Token

  • In order to make use of our API, you will need a Bitly Access Token.
    1. Sign up for a Bitly account if you do not already have one.
    2. Visit this page to get your Access Token.
  • Due to security concerns, do not include your access token as part of the submission. We will immediately reject any submission containing an access token!!!
Questions are not from any actual exam!!!
Q: Create a job that calculates pi to 2000 decimal points using the container with the image named perl
and the following commands issued to the container: ["perl", "-Mbignum=bpi", "-wle", "print bpi(2000)"]
Once the job has completed, check the logs to and export the result to pi-result.txt.
Solution:
const SECRET_KEY = ENTER YOUR SECRET KEY HERE;
const MAX_TOKENS = 200;
// For more cool AI snippets and demos, follow me on Twitter: https://twitter.com/_abi_
/**
* Completes your prompt with GPT-3
*
* @param {string} prompt Prompt
* @param {number} temperature (Optional) Temperature. 1 is super creative while 0 is very exact and precise. Defaults to 0.4.
@apotitech
apotitech / git.migrate
Created August 15, 2022 01:01 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@apotitech
apotitech / bulkCloneMoreThan100Repos.md
Created November 10, 2021 04:51 — forked from leadegroot/bulkCloneMoreThan100Repos.md
bulk clone github repos from a user or organisation

IF there are 100 or fewer repos, simply run:

curl -u $YOURUSERNAME -s https://api.github.com/orgs/$ORGNAME/repos?per_page=100 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'

(per https://gist.github.com/caniszczyk/3856584 )

and wait.

(Note when prompted for password, they do not mean your github web password, they mean your oauth token - all command line requests for password are actually for oath token. See https://github.com/blog/1509-personal-api-tokens to generate a token.)

@apotitech
apotitech / aws.json
Created September 24, 2021 17:43
CloudFormation Wordpress Template
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "Enterprise Wordpress Setup",
"Parameters": {
"KeyName": {
"Description": "Key Pair name",
"Type": "AWS::EC2::KeyPair::KeyName",
"Default": "mykey"
}
},