Skip to content

Instantly share code, notes, and snippets.

View swateek's full-sized avatar
🎯
One Small Step at a Time

Swateek Jena swateek

🎯
One Small Step at a Time
View GitHub Profile
If you'r using MAC Intel CPU you want to use VMware to virtual your desired OS such Windows or Ubuntu on the MAC OS you need to download VMware Fusion Player first then it has two version Pro and Player, the Player version is free for personal use but you need to create VM account to download and licence key.
You can create account to download yourself here:
https://customerconnect.vmware.com/group/vmware/evalcenter?p=fusion-player-personal
If you don't want to create account to get license, you can try below original license key for VMware Fusion Player:
COMPONENT:
VMware Fusion Player – Personal Use
@swateek
swateek / vagrant-vmware-tech-preview-apple-m1-pro.md
Created April 16, 2022 04:56 — forked from sbailliez/vagrant-vmware-tech-preview-apple-m1-pro.md
Vagrant and VMWare Tech Preview on Apple M1 Pro

Vagrant and VMWare Tech Preview on Apple M1 Pro

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated from discussions in hashicorp/vagrant-vmware-desktop#22

Installing Rosetta

First install Rosetta if not already done, this is needed to run x86 code:

import numpy as np
from numpy.linalg import norm
class Kmeans:
'''Implementing Kmeans algorithm.'''
def __init__(self, n_clusters, max_iter=100, random_state=123):
self.n_clusters = n_clusters
self.max_iter = max_iter
@swateek
swateek / nginx.conf
Created July 6, 2018 08:00 — forked from anjia0532/nginx.conf
nginx proxy_pass add a static parameter
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
@swateek
swateek / difference.js
Created June 8, 2018 07:54 — forked from Yimiprod/difference.js
Deep diff between two object, using lodash
/**
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
return _.transform(object, function(result, value, key) {
if (!_.isEqual(value, base[key])) {
@swateek
swateek / fresh-chrome-with-custom-tz.sh
Created February 15, 2018 03:31 — forked from prasadsilva/fresh-chrome-with-custom-tz.sh
Launch new instances of Google Chrome on OS X with isolated cache, cookies, user config and custom Timezone
#!/usr/bin/env bash
# fresh-chrome
#
# Use this script on OS X to launch a new instance of Google Chrome
# with its own empty cache, cookies, and user configuration.
#
# The first time you run this script, it will launch a new Google
# Chrome instance with a permanent user-data directory, which you can
# customize below. Perform any initial setup you want to keep on every