Skip to content

Instantly share code, notes, and snippets.

View aliuosio's full-sized avatar
🎯

Osiozekhai Aliu aliuosio

🎯
View GitHub Profile
@codekoala
codekoala / export_chrome_passwords.js
Last active June 24, 2023 11:54
Dump all passwords saved in Google Chrome (tested with Chrome 56.0.2906.0 on Arch Linux)
// Modified version of https://github.com/megmage/chrome-export-passwords
//
// This script allows you to dump all of the passwords stored in your Chrome
// profile. I tested it with Chrome 56.0.2906.0 dev (64-bit) on Arch Linux and
// it worked quite well.
//
// Usage:
//
// - Navigate to chrome://settings-frame/passwords
// - Copy this code into a snippet in Chrome
@ankurk91
ankurk91 / xdebug-mac.md
Last active March 9, 2024 22:20
php xDebug v3 on Ubuntu/Mac and phpStorm

🪲 Install and Configure xDebug v3 on MacOS for PhpStorm 🐘

  • Assuming that you have already installed php and apache via Homebrew

  • Install xDebug php extension

pecl channel-update pecl.php.net
pecl clear-cache

pecl install xdebug
@Vinai
Vinai / install-mage2.sh
Created April 25, 2016 12:54
Steps I use to install Magento 2 community edition
#!/bin/bash
FOLDER=example
DB_NAME=magento2
DB_USER=m2
DB_PWD=wiener
BASE_URL=http://example.dev/
composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition $FOLDER
@Vinai
Vinai / phpunit.xml
Created February 17, 2016 20:42
Magento 2 integration test phpunit.xml file with Mage2Katas testsuite configuration.
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
colors="true"
bootstrap="./framework/bootstrap.php"
>
<!-- Test suites definition -->
<testsuites>
<!-- Memory tests run first to prevent influence of other tests on accuracy of memory measurements -->
<testsuite name="Memory Usage Tests">
@Vinai
Vinai / M2 acl.xml
Last active February 27, 2025 20:36
My current Magento 2 PHPStorm File Templates (Feb 2016)
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
<acl>
<resources>
<resource id="Magento_Backend::admin">
</resource>
</resources>
</acl>
</config>
XDEBUG_CONFIG="idekey=PHPSTORM" php -dxdebug.remote_host=192.168.56.1 -dxdebug.remote_enable=on -f bin/magento setup:upgrade
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@AlexKMDev
AlexKMDev / install.sh
Last active November 12, 2018 06:30
homebrew nginx http/2
brew install nginx --devel --with-http2
# or
brew install https://gist.githubusercontent.com/Anakros/1891d0b4ec3ca2e34d97/raw/1d75c84f784845047aa7fb52b06becf9c1350da4/nginx.rb --with-http2 --devel
/* Modernizr 2.8.3 (Custom Build) | MIT & BSD
* Build: http://modernizr.com/download/#-cssclasses-addtest-prefixed-teststyles-testprop-testallprops-hasevent-prefixes-domprefixes-img_webp
*/
window.Modernizr = (function(window, document, undefined) {
var version = '2.8.3',
Modernizr = {},
enableClasses = true,
@sangeeths
sangeeths / github-to-bitbucket
Created March 10, 2014 15:24
Forking a Github repo to Bitbucket
Go to Bitbucket and create a new repository (its better to have an empty repo)
git clone [email protected]:abc/myforkedrepo.git
cd myforkedrepo
Now add Github repo as a new remote in Bitbucket called "sync"
git remote add sync [email protected]:def/originalrepo.git
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
git remote -v