Skip to content

Instantly share code, notes, and snippets.

View kevinnls's full-sized avatar
🥱
procras-coding

Kevin Samuel kevinnls

🥱
procras-coding
View GitHub Profile
prepend_to_path(){
for dir in "${@}"; do
if [ -d "${dir}" ]; then
PATH="${dir}:${PATH}"
fi
done
}
append_to_path(){
for dir in "${@}"; do
@kevinnls
kevinnls / summary-ish.md
Last active August 22, 2021 10:16
or at least the ones i am not too tired to note down. i'm lazy and forgetful. this is not the full list.

that's it for the basics

or at least the ones i am not too tired to note down. i'm lazy and forgetful. this is not the full list.

  • ssh login to a remote machine

    • password
    • ssh keys
      • generate: ssh-keygen -t ed25519 -C [meaningful comment]
      • connect: ssh -i [path/to/key] user@host
  • *nix

The software is implemented using JavaScript frameworks and Firebase. The Javscript frameworks, React and Express, are used for the frontend and backend respectively. Firebase is used for the authorization of users, sending and accepting friend requests, creating rooms to chat with other individuals and most importantly playing virtually with other users using Firebase Authentication, Firestore and Cloud Functions. With regards to the working of the gyration board, the fronted and backend are constantly in communication with each other from the time the device is turned ON. Express reads the signals from the Raspberry Pi, performs calculations as required and sends the data to the React frontend. Arrows indicating the position where the user should place their feet, and the scores of the user are displayed on a display device throughout the game.

hydra repo

also: hydra repository

noun hy·dra re·po

  1. a version controlled repository of code whose default branch is an insignificant tail that links to multiple heads that are branches of equal importance
    1. a single repo of multiple components because original author didn't want folders nor separate repos
    2. a single repo documenting the same thing in different {human, computer} languages, tones, etc.
  2. I haven't thought of any more.

setting up your forked repo to sync with upstream

what?

common workflow in oss contributions is fork → edit → pr
when making repeated contributions, the master branch of the fork needs to be in sync with the original – the upstream
and here's one way to do that

the workings

add all the placement cell activities to your calendar!

How?

PC/Android

  1. Open this link in a new tab on your device [bit.ly/pc-eng-cal][pc] (use a PC if possible)
  2. Check if you are in your MCC account. If yes: step 5.
  3. Click on Cancel

color codes in ... i think ANSI escape sequences?

declare -A fclr
declare -A bclr
declare -A mode
# modes
mode[0]="\[\e[0m\]"
mode[bold]="\[\e[1m\]"
mode[dim]="\[\e[2m\]"
mode[underline]="\[\e[4m\]"
private fun getResCards() {
val urlAllResCards = "http://13.235.250.119/v2/restaurants/fetch_result/"
val queue = Volley.newRequestQueue(activity as Context)
val allResCardsReq = object : JsonObjectRequest(Method.GET, urlAllResCards, null,
Response.Listener {
val response = it.getJSONObject("data")
if (response.getString("success") == "true") {
val data = response.getJSONArray("data")
for (i in 0 until data.length()) {

source (scroll down a bit)

import React from 'react';
 
const FirebaseContext = React.createContext(null);
 
export const withFirebase = Component => props => (
  <FirebaseContext.Consumer>
    {firebase => <Component {...props} firebase={firebase} />}