Skip to content

Instantly share code, notes, and snippets.

View ram-rana-16's full-sized avatar
🏠
Working from home

Ram Rana ram-rana-16

🏠
Working from home
View GitHub Profile
@ram-rana-16
ram-rana-16 / GoLang setup
Last active June 26, 2018 05:58
GOlang Setup Environment Linux and OS X
#Set these variables in .bash_profile (OS X) file
export GOPATH=$HOME/workspace
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
bits/stdc++ is a GNU GCC extension, whereas OS X uses the clang compiler. However, you can still make it work by manually creating the header file.
Inside the directory /usr/local/include/bits (create bits), make a file called stdc++.h paste the below content
// C++ includes used for precompiling -*- C++ -*-
// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@ram-rana-16
ram-rana-16 / grub.md
Last active June 25, 2016 16:31
How to Repair, Restore, or Reinstall Grub 2 with a Ubuntu Live CD or USB
sudo mount /dev/sdXY /mnt
[It is usually a EXT4 Partition. Replace the XY with the drive letter, and partition number, for example]
sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys
[Now we jump into that using chroot.]