Skip to content

Instantly share code, notes, and snippets.

View palashkulsh's full-sized avatar
🍓
delusion of reprieve

palash kulshreshtha palashkulsh

🍓
delusion of reprieve
View GitHub Profile
how to find all forks of a github repository
http://forked.yannick.io/
I've been trying to get started with json in c++ and i think i've finally found out a way.
Following are the steps.
run the following command and it will download the library to a folder
git clone https://github.com/miloyip/rapidjson
This will clone the following repo which provides json usage in c++
now make a new folder where you will be writing your c++ code
now copy the rapidjson/include/rapidjson to your project folder you made in step 4
now your folder should have YOUR_FOLDER_NAME/rapidjson present in it.we will use this directory to include rapidjson library in our file
now copy the attached file in your project folder you made in step 4
compile the file using g++ testing.cpp
@palashkulsh
palashkulsh / download_full_website_using_wget.sh
Last active July 15, 2017 19:07
Downloading entire website using wget
wget -l 1 --recursive --page-requisites --html-extension --domains elastic.co --no-parent https://www.elastic.co/guide/en/logstash/current/
--page-requisites > all css pics and all that
--html-extension > files downloaded with html extenstion
--domains > scrape files only of this domain
--no-parent > don't follow links outside the directory https://www.elastic.co/guide/en/logstash/current/.
converting website to pdf
find ../www.elastic.co/guide/en/logstash/current/ -iname "*.html" -exec electron-pdf {} {}.pdf \;
#to get id of vpn run
#nmcli con
#!/bin/bash
if [ "$1" = 'd' ];
then
nmcli con down id VPN_USERNAME > /dev/null &
else
echo 'vpn.secrets.password':`oathtool --base32 --totp "SECRET"`>/tmp/pwd && nmcli con up id VPN_USERNAME passwd-file /tmp/pwd >/dev/null &
fi