Skip to content

Instantly share code, notes, and snippets.

View mmmpop's full-sized avatar
🏠
Working from home

Mike Poplin mmmpop

🏠
Working from home
View GitHub Profile
@psamit
psamit / Vagrantfile
Created November 5, 2016 11:51 — forked from mefellows/Vagrantfile
Example Vagrant Windows SMB Setup
VAGRANTFILE_API_VERSION = "2"
require 'io/console'
# Capture login details if starting up vagrant or provisioning it
# Required for AD operations.
#
# Environment variables prevent explicit user input. Useful for CI.
username = ENV["VAGRANT_USER"] || nil
password = ENV["VAGRANT_PASSWORD"] || nil
@rcugut
rcugut / node-npm-install.md
Last active February 2, 2024 11:51 — forked from DanHerbert/fix-homebrew-npm.md
Install node & npm on Mac OS X with Homebrew

DEPRECATED as of macOS 10.13 (High Sierra). See the new GUIDE to install nvm and yarn for macOS (updated July 2019)

Fixing npm On Mac OS X for Homebrew Users

Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.

Solution

This solution fixes the error caused by trying to run npm update npm -g. Once you're finished, you also won't need to use sudo to install npm modules globally.

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@gwillem
gwillem / magento-nginx.conf
Last active July 29, 2023 10:13
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
@n3r0-ch
n3r0-ch / docker-nuke
Last active August 23, 2019 16:44
docker-nuke exists to do one thing; clean up your Docker environment. It's not called docker-carefully-and-nicely-spritz-up. Be carefully!
#!/bin/bash
#Check if user is root
if [ $UID != 0 ]; then
echo "You need to be root to use this script."
exit 1
fi
echo "docker-nuke exists to do one thing; clean up your Docker environment. It's not called docker-carefully-and-nicely-spritz-up. Be carefully!"
echo
@DenisIzmaylov
DenisIzmaylov / INSTALLATION.md
Last active April 27, 2023 15:44
OS X 10.11 El Capitan: fresh install with Node.js (io.js) Developer Environment

OS X 10.11 (El Capitan) / Node.js and io.js Developer Environment

Custom recipe to get OS X 10.11 El Capitan running from scratch with useful applications and Node.js Developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after fresh install.

Content

@nexdrew
nexdrew / redis-server
Created April 29, 2015 23:57
Example files for running Redis on CentOS 7 (after manual install)
/var/lib/redis/logs/redis.log {
daily
rotate 14
copytruncate
delaycompress
compress
notifempty
missingok
}
@nolanlawson
nolanlawson / protips.js
Last active February 4, 2024 18:06
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@mefellows
mefellows / Vagrantfile
Created December 7, 2014 21:24
Example Vagrant Windows SMB Setup
VAGRANTFILE_API_VERSION = "2"
require 'io/console'
# Capture login details if starting up vagrant or provisioning it
# Required for AD operations.
#
# Environment variables prevent explicit user input. Useful for CI.
username = ENV["VAGRANT_USER"] || nil
password = ENV["VAGRANT_PASSWORD"] || nil
@anandsunderraman
anandsunderraman / setChromeOptions.js
Last active February 21, 2023 01:07
Selenium Web Driver Set Chrome Options
//import the selenium web driver
var webdriver = require('selenium-webdriver');
var chromeCapabilities = webdriver.Capabilities.chrome();
//setting chrome options to start the browser fully maximized
var chromeOptions = {
'args': ['--test-type', '--start-maximized']
};
chromeCapabilities.set('chromeOptions', chromeOptions);
var driver = new webdriver.Builder().withCapabilities(chromeCapabilities).build();