Skip to content

Instantly share code, notes, and snippets.

View vutsalsinghal's full-sized avatar
🥑
The more I learn the more I realize how much more there is to learn!

Vutsal vutsalsinghal

🥑
The more I learn the more I realize how much more there is to learn!
  • San Francisco, CA
View GitHub Profile
@vutsalsinghal
vutsalsinghal / quinesnake.cpp
Created August 14, 2019 23:05
Snakes game!
/*bin/ls>/dev/null;sed -n 's/.*.\/\*\(.*\)../\1/p' $0|I=$0 sh;exit;*/std::map<I,
I>m={{97,1},{'w',/*echo g++ -std=c++11 -oo $I -lcurses -DI=int -DF=if -DK=ret\*/
2},{'d',3}};I/*urn -includectime,curses.h,iostream,map,unistd.h|sed s/,/\ -in\*/
w=80,h=28,x=2,y=2,a=2,b=0,d,e,z=768;std::wstring/*clude/g|sh;./o</dev/tty;exit*/
s=LR"x(/*bin/ls>/dev/null;sed -n 's/.*.\/\*\(.*\)../\1/p' $0|I=$0 sh;exit;*/std:
:map<I,I>m={{97,1},{'w',/*echo g++ -std=c++11 -oo $I -lcurses -DI=int -DF=if -DK
=ret\*/2},{'d',3}};I/*urn -includectime,curses.h,iostream,map,unistd.h|sed s/,/\
-in\*/w=80,h=28,x=2,y=2,a=2,b=0,d,e,z=768;std::wstring/*clude/g|sh;./o</dev/tty
;exit*/s=LR"x%dx";I G(I x,I y){K 3&s[y*w+x]>>8;}I C(I x,I y,I c){(s[y*w+x]&=~z)|
=c<<8;}I P(I d,I &x,I &y){F(d==1)x-=2;!d&&y++;d==2&&y--;F(d==3)x+=2;}I M(){curs_
#!/bin/bash
## Set nano version
nano_file='nano-4.3'
curl -O https://www.nano-editor.org/dist/v4/$nano_file.tar.xz
tar -xvf $nano_file.tar.xz
cd $nano_file
./configure
make

Keybase proof

I hereby claim:

  • I am vutsalsinghal on github.
  • I am pyofey (https://keybase.io/pyofey) on keybase.
  • I have a public key ASBqP9--pF3qOaNckDYLq1YJADvmNBtkTynstjNTE2w5iAo

To claim this, I am signing this object:

############################################################################
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
@vutsalsinghal
vutsalsinghal / mac_setup.sh
Last active September 12, 2022 21:54
Mac setup
# Mac setup!
# Run after .bash_profile/.bashrc setup (alias)
## Install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
## Update and upgrade
sup
# Append at the end /boot/firmware/cmdline.txt (make sure there is no newline at the end)
cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $USER
sudo apt install zip screen python3-pip
sudo python3 -m pip install docker-compose certbot
# Install code-server