Skip to content

Instantly share code, notes, and snippets.

@jancurn
jancurn / proxy-chain-example.js
Last active February 29, 2024 07:26
Example showing how to use the proxy-chain NPM package to let headless Chrome use a proxy server with username and password
const puppeteer = require('puppeteer');
const proxyChain = require('proxy-chain');
(async() => {
const oldProxyUrl = 'http://bob:password123@proxy.example.com:8000';
const newProxyUrl = await proxyChain.anonymizeProxy(oldProxyUrl);
// Prints something like "http://127.0.0.1:45678"
console.log(newProxyUrl);
@sheikhwaqas
sheikhwaqas / setup-mongodb34-ubuntu16.sh
Last active September 17, 2020 09:55
Install mongoDB 3.4 on Ubuntu 16.04 LTS
###############################################################################
# Install mongoDB Server on Ubuntu 16.04 LTS
###############################################################################
# Import the Public Key used by the Ubuntu Package Manager
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
# Create a file list for mongoDB to fetch the current repository
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.4.list
@Sammitch
Sammitch / answer.md
Created December 15, 2016 02:33
Answer to a StackOverflow question locked by idiots...
@LeCoupa
LeCoupa / redis_cheatsheet.bash
Last active March 18, 2024 09:08
Redis Cheatsheet - Basic Commands You Must Know --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
@bkozora
bkozora / vhosts-via-VirtualDocumentRoot.conf
Last active January 24, 2019 11:20
Apache - Dynamic Subdomains Using VirtualDocumentRoot
#
# Wildcard VirtualHost Example Using VirtualDocumentRoot
#
# Almost any Apache directive may go into a VirtualHost container.
# This we know from the Apache documentation posted everywhere.
# However, a hidden gem within that documentation is that we can use
# regular expressions to match parts of the requested domain to paths
# on our filesystem by using %1 and other variations.
#
# To use this, all we have to do is create cooresponding directories,
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active May 1, 2024 13:52
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@rupl
rupl / user-actions.js
Last active May 11, 2018 22:46
A CasperJS script to demonstrate simple user navigation actions on a website. This sample accompanies a blog post about CasperJS found at http://fourword.fourkitchens.com/article/simulate-user-actions-casperjs
/**
* @file
* Simulating user actions with CasperJS. This script explores the ability to
* use Casper for navigation just like a user would: clicking the page and
* entering text to submit a form. This script accompanies a blog post from
* Four Kitchens:
*
* @see http://fourword.fourkitchens.com/article/simulate-user-actions-casperjs
*/