Skip to content

Instantly share code, notes, and snippets.

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

Ariel Magbanua arielmagbanua

🏠
Working from home
View GitHub Profile
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active May 4, 2024 15:07
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@aagarwal1012
aagarwal1012 / flutter-ci.yml
Last active March 23, 2024 11:54
CI for your Flutter apps on GitHub Actions.
name: Flutter CI
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- master
# on: push # Default will running for every branch.
@zmaupin
zmaupin / maximum_pairwise_product.py
Created October 9, 2019 02:15
Maximum Pairwise Product Algorithm
# maximum pairwise product
# find the maximum product of two distinct numbers in a sequence of
# non-negative integers
# input: sequence of non-negative integers
# output: maximum value that can be obtained by multiplying two different
# elements from the sequence
import random
def maximum_pairwise_product(a):
@alejandro-martin
alejandro-martin / multiple-ssh-keys-git.adoc
Last active May 2, 2024 22:56
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

@giolaq
giolaq / index.js
Created October 29, 2017 08:08
Script to use Firebase Cloud Functions and Vision API
const Vision = require('@google-cloud/vision');
const vision = Vision();
const functions = require('firebase-functions');
const admin = require("firebase-admin");
admin.initializeApp(functions.config().firebase);
exports.callVision = functions.storage.object().onChange(event => {
const object = event.data;
const fileBucket = object.bucket;
const filePath = object.name;
@addyosmani
addyosmani / workbox.md
Last active January 20, 2024 16:14
Workbox recipes

Workbox runtime caching recipes

Your Service Worker script will need to import in Workbox and initialize it before calling any of the routes documented in this write-up, similar to the below:

importScripts('workbox-sw.prod.v1.3.0.js');
const workbox = new WorkboxSW();

// Placeholder array populated automatically by workboxBuild.injectManifest()
@mGalarnyk
mGalarnyk / machineLearningWeek3Quiz1.md
Created June 21, 2017 17:00
Machine Learning (Stanford) Coursera Logistic Regression Quiz (Week 3, Quiz 1) for the github repo: https://github.com/mGalarnyk/datasciencecoursera/tree/master/Stanford_Machine_Learning

Machine Learning Week 3 Quiz 1 (Logistic Regression) Stanford Coursera

Github repo for the Course: Stanford Machine Learning (Coursera)
Quiz Needs to be viewed here at the repo (because the image solutions cant be viewed as part of a gist)

Question 1

Answer | Explanation

@Jonalogy
Jonalogy / handling_multiple_github_accounts.md
Last active April 29, 2024 13:49
Handling Multiple Github Accounts on MacOS

Handling Multiple Github Accounts on MacOS

The only way I've succeeded so far is to employ SSH.

Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config file in a .ssh directory. The config file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh directory by default. You can navigate to it by running cd ~/.ssh within your terminal, open the config file with any editor, and it should look something like this:

Host *
 AddKeysToAgent yes

> UseKeyChain yes

Machine Learning Week 1 Quiz 2 (Linear Regression with One Variable) Stanford Coursera

Github repo for the Course: Stanford Machine Learning (Coursera)

Question 1

Consider the problem of predicting how well a student does in her second year of college/university, given how well she did in her first year.

Specifically, let x be equal to the number of "A" grades (including A-. A and A+ grades) that a student receives in their first year of college (freshmen year). We would like to predict the value of y, which we define as the number of "A" grades they get in their second year (sophomore year).

@MariadeAnton
MariadeAnton / hi-satellite.md
Last active August 7, 2022 18:06
Travis CI Demo Examples - GitHub Satellite 2019