Skip to content

Instantly share code, notes, and snippets.

View abhi18av's full-sized avatar
:octocat:
(to-infinity-and-beyond!)

Abhinav Sharma abhi18av

:octocat:
(to-infinity-and-beyond!)
View GitHub Profile
@abhi18av
abhi18av / binary_tree_1.scm
Created January 15, 2020 15:32 — forked from zallarak/binary_tree_1.scm
Binary trees in Scheme
; sets as unordered lists:
; a set for now is defined as as being able
; to undergo the following operations
; 1) element-of-set? checks if x is in set
(define (element-of-set? x set)
(cond ((null? set) false)
((equal? x (car set)) true)
(else (element-of-set? x (cdr set)))))

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

Update 7/28/2019: An updated version of this guide for Ubuntu Server 18.04 LTS is now available. Feel free to check it out.

Mounting VirtualBox shared folders on Ubuntu Server 16.04 LTS

This guide will walk you through steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest. Tested on Ubuntu Server 16.04.3 LTS (Xenial Xerus)

Steps:

  1. Open VirtualBox
  2. Right-click your VM, then click Settings
  3. Go to Shared Folders section
@abhi18av
abhi18av / async.cljs
Created August 27, 2019 09:32 — forked from alehatsman/async.cljs
ClojureScript throttle and debouce functions
(ns async
(:import [goog.async Throttle Debouncer]))
(defn disposable->function [disposable listener interval]
(let [disposable-instance (disposable. listener interval)]
(fn [& args]
(.apply (.-fire disposable-instance) disposable-instance (to-array args)))))
(defn throttle [listener interval]
(disposable->function Throttle listener interval))
@abhi18av
abhi18av / Linear Search in Haskell, Clojure, Go, JavaScript.md
Created August 5, 2019 06:51
Linear Search and algorithmic complexity
  • Haskell
import Data.List
 
haystack=["Zig","Zag","Wally","Ronald","Bush","Krusty","Charlie","Bush","Bozo"]
needles = ["Bush"]

map (\x -> (x, elemIndex x haystack)) needles
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 26 columns, instead of 24. in line 6.
car_ID,symboling,CarName,fueltype,aspiration,doornumber,carbody,drivewheel,enginelocation,wheelbase,carlength,carwidth,carheight,curbweight,enginetype,cylindernumber,enginesize,fuelsystem,boreratio,stroke,compressionratio,horsepower,peakrpm,citympg,highwaympg,price
1,3,alfa-romero giulia,gas,std,two,convertible,rwd,front,88.6,168.8,64.1,48.8,2548,dohc,four,130,mpfi,3.47,2.68,9,111,5000,21,27,13495
2,3,alfa-romero stelvio,gas,std,two,convertible,rwd,front,88.6,168.8,64.1,48.8,2548,dohc,four,130,mpfi,3.47,2.68,9,111,5000,21,27,16500
3,1,alfa-romero Quadrifoglio,gas,std,two,hatchback,rwd,front,94.5,171.2,65.5,52.4,2823,ohcv,six,152,mpfi,2.68,3.47,9,154,5000,19,26,16500
4,2,audi 100 ls,gas,std,four,sedan,fwd,front,99.8,176.6,66.2,54.3,2337,ohc,four,109,mpfi,3.19,3.4,10,102,5500,24,30,13950
5,2,audi 100ls,gas,std,four,sedan,4wd,front,99.4,176.6,66.4,54.3,2824,ohc,five,136,mpfi,3.19,3.4,8,115,5500,18,22,17450
6,2,audi fox,gas,std,two,sedan,fwd,front,99.8,177.3,66.3,53.1,2507,ohc,five,136,mpfi,3.19,3.4,8.5,110,5500,
@abhi18av
abhi18av / README.md
Created January 29, 2019 09:34 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@abhi18av
abhi18av / owl-build-arm64.md
Created January 27, 2019 05:05
The build log for the OWL library on AArch / arm64 architecture
 ___  ___ __ _| | _____      ____ _ _   _
/ __|/ __/ _` | |/ _ \ \ /\ / / _` | | | |
\__ \ (_| (_| | |  __/\ V  V / (_| | |_| |
|___/\___\__,_|_|\___| \_/\_/ \__,_|\__, |
                                    |___/

Welcome on Ubuntu Bionic Beaver (18.04 LTS) (GNU/Linux 4.4.127-mainline-rev1 aarch64 )
# this is a copay/paste combination of https://gist.github.com/nictuku/13afc808571e742d3b1aaa0310ee8a8d & https://gist.github.com/Rahul91/f051a391fac62ccebb581370b0ac644d
# so that we can install virtualbox via apt-get
for x in xenial xenial-security xenial-updates; do
egrep -qe "deb-src.* $x " /etc/apt/sources.list || echo "deb-src http://archive.ubuntu.com/ubuntu ${x} main universe" | sudo tee -a /etc/apt/sources.list
done
echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" | sudo tee -a /etc/apt/sources.list.d/virtualbox.list
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
# allow us to make a kernel
(*
*
* http://deckofcardsapi.com/
*
*)
#require "lwt";;
#require "cohttp";;
#require "cohttp-lwt-unix";;