Skip to content

Instantly share code, notes, and snippets.

View pobegov's full-sized avatar
🎯
Focusing

Pavel S. Pobegov pobegov

🎯
Focusing
View GitHub Profile
@pobegov
pobegov / 1. Building PHP-MAMP on Apple Silicon M1.md
Created June 25, 2021 14:37 — forked from lennardv2/1. Building PHP-MAMP on Apple Silicon M1.md
Native PHP development / MAMP stack on Apple silicon M1

Building the MAMP stack (php, apache & mysql) on Apple Silicon ARM (native)

In this tutorial, we'll build the the nescessary packages for ARM via homebrew. After that we'll configure apache2 for using virtual hosts. The native php is ofcourse way faster, see the results of this benchmark below.

TEST NAME SECONDS OP/SEC
Rosetta2 191.654 sec 1.96 MOp/s
Intel i7-4790K (imac 2014) 156.791 sec 2.39 MOp/s
Intel i5-8500B (mini 2018) 141.381 sec 2.65 MOp/s
ARM m1 43.745 sec 8.58 MOp/s
@pobegov
pobegov / iterm2-solarized.md
Created June 24, 2021 08:46 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@pobegov
pobegov / convert_latin1_data_in_a_utf8_mysql_database_to_utf8mb4.php
Created July 4, 2019 17:12
Convert MySQL Database (tables and data) to UTF8MB4, where UTF8 data stored via latin1 connection
<?php
/**
* Requires php >= 5.5
*
* Use this script to convert utf-8 data in utf-8 mysql tables stored via latin1 connection
* This is a PHP port from: https://gist.github.com/njvack/6113127
*
* BACKUP YOUR DATABASE BEFORE YOU RUN THIS SCRIPT!
*
* Once the script ran over your databases, change your database connection charset to utf8:
@pobegov
pobegov / Update Fork.md
Created October 3, 2018 16:33 — forked from seankross/Update Fork.md
Update a Github Fork from the Original Repo

Taken from here

Add remonte branch:

git remote add --track master mleung git://github.com/mleung/feather.git

Verify:

git remote

@pobegov
pobegov / migrate.sh
Created June 1, 2018 15:11 — forked from pedro-santiago/migrate.sh
Upgrade MAMP 4 to Mysql 5.7.18 (on Sierra tested)
#!/bin/sh
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.18-macos10.12-x86_64.tar.gz
tar xfvz mysql-5.7.18-macos10.12-x86_64.tar.gz
echo "Stopping MAMP"
sudo /Applications/MAMP/bin/stop.sh
sudo killall httpd mysqld
echo "Copy Bin"
@pobegov
pobegov / curl.md
Created May 10, 2017 08:31 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@pobegov
pobegov / multiple_ssh_setting.md
Created July 25, 2016 09:02 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"