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
@eloylp
eloylp / Fedora35Hibernation.md
Last active March 25, 2024 15:47
Fedora 35 hibernation with swapfile, only for hibernation and resume

Fedora35 hibernation

This guide helps to configure the hibernation on a default Fedora35 (also worked fine in previous Fedora34) installation by using a swap file. The Fedora35 installation comes with btrfs as default filesystem. Also, it comes with a zram swap device:

$ swapon
NAME       TYPE      SIZE USED PRIO
/dev/zram0 partition   8G   0B  100
<?php
//answer for https://www.testdome.com/questions/php/file-owners/11840?visibility=17&skillId=5
class FileOwners
{
public static function groupByOwners($files)
{
$result=array();
foreach($files as $key=>$value)
{
$result[$value][]=$key;
@jdhao
jdhao / gcc-5.4.0-install.sh
Last active February 20, 2024 08:46
The script will install GCC 5.4.0 on your CentOS 7 system, make sure you have root right. See https://jdhao.github.io/2017/09/04/install-gcc-newer-version-on-centos/ for more details.
echo "Downloading gcc source files..."
curl https://ftp.gnu.org/gnu/gcc/gcc-5.4.0/gcc-5.4.0.tar.bz2 -O
echo "extracting files..."
tar xvfj gcc-5.4.0.tar.bz2
echo "Installing dependencies..."
yum -y install gmp-devel mpfr-devel libmpc-devel
echo "Configure and install..."
@joostvanveen
joostvanveen / delete_customers_and_orders_from_magento.sql
Last active September 16, 2021 19:07
Delete all customers and orders from Magento 1*
--
-- This query delelets all customers and orders from your
-- Magento 1.* install. Handy, if you have a bloated
-- Magento database and you need to do a bit
-- of cleaning up for use on a local machine.
--
-- Replace PREFIX_ with your current Magento table prefix.
--
-- USE AT OWN RISK. ALWAY BACKUP YOUR DATABASE FIRST.
--
@meanevo
meanevo / haproxy.cfg
Last active July 25, 2019 16:51
H2, HTTP/1.1 traffic balance/routing with HAProxy 1.7 (with SSL-Termination) and Nginx 1.10.2
#---------------------------------------------------------------------
# Global settings
#---------------------------------------------------------------------
global
daemon
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 2048
user haproxy
group haproxy
@crsuarez
crsuarez / gist:5a066638a805e46b448acebd4f5fe8d1
Last active January 14, 2021 05:40 — forked from wacko/gist:5577187
SSH between Mac OS X host and Virtual Box guest

On Mac OS (host):

Shutdown your VM and do:
On a terminal:

VBoxManage hostonlyif create
VBoxManage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1
VBoxManage dhcpserver add --ifname vboxnet0 --ip 192.168.56.1 --netmask 255.255.255.0 --lowerip 192.168.56.100 --upperip 192.168.56.200
VBoxManage dhcpserver modify --ifname vboxnet0 --enable
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@SergeyMiracle
SergeyMiracle / nginx_auto_start.sh
Created January 13, 2017 04:42 — forked from aymanosman/nginx_auto_start.sh
Nginx: Start nginx on boot on Mac
# brew install nginx
sudo ln -s /usr/local/opt/nginx/homebrew.mxcl.nginx.plist /Library/LaunchDaemons/
sudo chown root:wheel /usr/local/opt/nginx/homebrew.mxcl.nginx.plist
sudo launchctl load /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
# Why do you need sudo?
# If you want nginx to be able to bind to port 80, it will need superuser privileges
@iamakulov
iamakulov / index.md
Last active May 22, 2020 15:28
Fixing babel-plugin-add-module-exports in Webpack 2

babel-plugin-add-module-exports generates an incorrect bundle if you use ES modules in the latest versions of Webpack 2 (at least in 2.1.0-beta.27 and .28). Here’s what to do.

1. Remove the plugin:

{
  "plugins": [
-   "add-module-exports"
  ]
}

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?