Skip to content

Instantly share code, notes, and snippets.

@nzvtrk
nzvtrk / axiosInterceptor.js
Last active September 13, 2024 00:50
Axios create/recreate cookie session in node.js enviroment
/* Basic example of saving cookie using axios in node.js and session's recreation after expiration.
* We have to getting/saving cookie manually because WithCredential axios param use XHR and doesn't work in node.js
* Also, this example supports parallel request and send only one create session request.
* */
const BASE_URL = "https://google.com";
// Init instance of axios which works with BASE_URL
const axiosInstance = axios.create({ baseURL: BASE_URL });
####### Apache Installation
sudo apachectl stop
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null
brew install httpd
#Now we just need to configure things so that our new Apache server is auto-started
sudo brew services start httpd
#You can see Apache running on the browser by default http://localhost:8080
@Acesmndr
Acesmndr / instagramunfollowers.js
Last active October 19, 2024 10:34
Get Instagram Unfollowers: Get a list of people whom you follow but who do not follow you back on Instagram as well as the list of people who follow you but whom you don't follow back!
// Gist by [email protected] Rev 2.1.2 May 15, 2019
// go to your insta profile page (not the home page). It looks something like this: https://instagram.com/YOUR_PROFILE
// Open javascript console "Ctrl + Shift + i" in Windows/Linux and "Cmd + option + i" in Mac.
// Paste the entire code below to the console and hit enter
// You will get the list of people whom you follow but who don't follow you back and viceversa as well as the entire list of followers and following
var following = [],
followers = [],
followersCount = 0,
followingCount = 0,
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A