Skip to content

Instantly share code, notes, and snippets.

View anjannath's full-sized avatar
🏴‍☠️

Anjan Nath anjannath

🏴‍☠️
  • Red Hat
  • Earth
View GitHub Profile
In disconnected state macOS doesnot make dns requests.. so we need to make a tap device assign it an ip so that it thinks it is still connected to something,
after that the resolver file inside /etc/resolver/nip.io will be used for the resolving so we only need to ccreate a tap device and that's it.
1. Install the `tuntap` package from brew
2. Create a network service using the tap device.. need to edit the file in /Library/Preferences/SystemConfiguration/preferences.plist
add the following snippet to that file, under _NetworkServices_ key need to generate a uuid (`uuidgen`)
```
<key>D16F22CE-6DDE-4E63-837C-E16538EA5CCB</key> <-- uuid
<dict>
<key>DNS</key>

Keybase proof

I hereby claim:

  • I am anjannath on github.
  • I am anjannath (https://keybase.io/anjannath) on keybase.
  • I have a public key ASDY9truHVgMDkiQWnDYT-SF4WuE7whF-oyGI24drYAWdwo

To claim this, I am signing this object:

Setting up Vim as your Go IDE

The final IDE

Intro

I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.

Getting Started

I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.

@anjannath
anjannath / tz.sh
Created April 6, 2018 08:18 — forked from chmouel/tz.sh
#!/usr/bin/env bash
# needs bash v4
# you can do things like this :
# % tz
# % tz 10h30
# % tz 10h30 next week
# % tz 11:00 next thursday
#
# and so on!
@anjannath
anjannath / change_locale_win.txt
Created February 22, 2018 09:31
Steps to change the locale in windows using powershell
Steps to change the system language:
--------------------------------------------------
$Language can be "jp-JP", "as-IN", etc.. Need to install the language pack before you can use it,
to install language pack use commands:
```powershell
$LP = Get-MUIPackagePath $Language $(Get-OSCurrentVersion).Version
Add-WindowsPackage -Online -PackagePath $LP.Path
Restart-Computer -Force -Confirm
```
.Getting to WaitForSSH function...
(minishift) Calling .GetSSHHostname
(minishift) DBG | [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Get-VM minishift ).state
(minishift) DBG | [stdout =====>] : Running
(minishift) DBG |
(minishift) DBG | [stderr =====>] :
(minishift) DBG | [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive (( Get-VM minishift ).networkadapters[0]).ipaddresses[0]
(minishift) DBG | [stdout =====>] : 172.17.160.249
(minishift) DBG |
(minishift) Calling .GetSSHPort