Skip to content

Instantly share code, notes, and snippets.

@nathanmoon
nathanmoon / VirtualBox Shared Folder Ubuntu
Created January 8, 2020 02:51
Shared Folders in VirtualBox Ubuntu guest
Use gui to add shared folder.
To get permission to folder in guest:
sudo adduser $USER vboxsf
@nathanmoon
nathanmoon / VirtualBox Guest Additions Ubuntu
Created January 8, 2020 02:37
Installing VirtualBox guest additions in Ubuntu
Devices -> “Insert Guest Additions CD Image”
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
sudo mkdir -p /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
cd /mnt/cdrom
sudo sh ./VBoxLinuxAdditions.run --nox11
@nathanmoon
nathanmoon / VirtualBox network setup
Last active February 5, 2020 05:39
VirtualBox network setup (Ubuntu 18)
1. Create Host Network Adapter
2. Add Host Only network adapter to vm setting
3. Edit /etc/netplan/50-cloud-init.yaml
4. Add to ethernets:
enp0s8:
dhcp4: no
dhcp6: no
addresses: [192.168.56.4/24]
nameservers:
addresses: [192.168.56.1]

Keybase proof

I hereby claim:

  • I am nathanmoon on github.
  • I am nathanmoon (https://keybase.io/nathanmoon) on keybase.
  • I have a public key ASDr5qOd0_7ygEkuBbF9Cc4928uQn347A0Xec68YCtZWrQo

To claim this, I am signing this object:

@nathanmoon
nathanmoon / gist:8465558
Last active January 3, 2016 12:49
highlights
# proposal 1
{
'results' : [{
'id' : 1,
'name' : 'John Smith',
'email' : 'john@gmail.com',
},
{
'id' : 2,
'name' : 'Jack Williams',
@nathanmoon
nathanmoon / gist:8344115
Created January 9, 2014 23:27
elasticsearch missing nested filters
curl -XDELETE "http://localhost:9200/nestedfilters"
curl -XPOST "http://localhost:9200/nestedfilters/"
curl -XPOST "http://localhost:9200/nestedfilters/item/_mapping" -d '
{
"item" : {
"properties" : {
"description" : {
"type" : "string"
@nathanmoon
nathanmoon / gist:8339950
Created January 9, 2014 19:03
elasticsearch nested filters
curl -XDELETE "http://localhost:9200/nestedfilters"
curl -XPOST "http://localhost:9200/nestedfilters/"
curl -XPOST "http://localhost:9200/nestedfilters/item/_mapping" -d '
{
"item" : {
"properties" : {
"description" : {
"type" : "string"
@nathanmoon
nathanmoon / gist:8228507
Created January 2, 2014 22:41
elasticsearch nested facets and facet_filters
curl -XDELETE "http://localhost:9200/nestedfacets"
curl -XPOST "http://localhost:9200/nestedfacets/"
curl -XPOST "http://localhost:9200/nestedfacets/item/_mapping" -d '
{
"item" : {
"properties" : {
"description" : {
"type" : "string"