Skip to content

Instantly share code, notes, and snippets.

View kalharbi's full-sized avatar

Khalid Alharbi kalharbi

  • Saudi Arabia
View GitHub Profile
@kalharbi
kalharbi / dummy-dataframe-example.ipynb
Created September 25, 2016 17:04
Python Pandas - Expand cells containing lists into columns (dummy/indicator matrix)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kalharbi
kalharbi / .env.development
Created August 29, 2019 20:44
User Authentication and Private Routes in React, React-Router, Redux, and Firebase
REACT_APP_DEV_API_KEY=XXX
REACT_APP_DEV_AUTH_DOMAIN=XXX
REACT_APP_DEV_DATABASE_URL=XXX
REACT_APP_DEV_PROJECT_ID=XXX
REACT_APP_DEV_STORAGE_BUCKET=XXX
REACT_APP_DEV_MESSAGING_SENDER_ID=XXX
REACT_APP_DEV_ID=XXX
@kalharbi
kalharbi / OuterClass.java
Last active May 3, 2023 15:44
what seems to be a bug in getDeclaredConstructors(). Will check back later.
public class OuterClass
{
private int x;
private OuterClass(int x){
this.x =x;
}
public static void main( String[] args )
{
// Should print 1 constructor not 2
System.out.println(OuterClass.class.getDeclaredConstructors().length); // prints 2
@kalharbi
kalharbi / GeoCoordinates.java
Created September 28, 2023 09:13
Java Map lookup example
package geoCoordinatesMap;
final class GeoCoordinates {
private final double latitude;
private final double longitude;
public GeoCoordinates(double latitude, double longitude) {
this.latitude = latitude;
this.longitude = longitude;
}
@kalharbi
kalharbi / Vagrant on arm64 Apple Silicon with VMWare Fusion Pro as a provider.md
Created May 21, 2024 07:36
Starting a Vagrant box on arm64/Apple Silicon (M1, M2 chips) with VMWare Fusion Pro as a provider

Starting a VM (Vagrant Box) on Apple Silicon/arm64/M-chips

  • Download and install Vagrant
brew tap hashicorp/tap
brew install hashicorp/tap/hashicorp-vagrant