Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Csacskamacskak elonyben.

kovax progcode

:octocat:
Csacskamacskak elonyben.
View GitHub Profile
@progcode
progcode / deploy.sh
Created Jun 14, 2020
Magento2 Deploy
View deploy.sh
php bin/magento maintenance:enable
rm -rf pub/static/*
rm -rf var/cache/*
rm -rf var/view_preprocessed/*
rm -rf var/generation/*
rm -rf var/page_cache/*
rm -rf var/di/*
php bin/magento deploy:mode:set developer
php bin/magento setup:upgrade
php bin/magento setup:di:compile
@progcode
progcode / magyarhelper.php
Last active Nov 6, 2019
Magyar embernek magyar PHP! Ez a Nemzeti PHP!
View magyarhelper.php
<?php
function benne_van($micsoda, $miben = array()) {
return in_array($micsoda, $miben);
}
function benne_van_e_a_tombben($micsoda, $miben = array()) {
return in_array($micsoda, $miben);
}
View gist:295e7ad9a66ba470f27b84f1c5319cff
Verifying my Blockstack ID is secured with the address 187zE9z4cicRaaMZR5UaDgVWg8odwkwYXs https://explorer.blockstack.org/address/187zE9z4cicRaaMZR5UaDgVWg8odwkwYXs
View docker-compose.yml
##
## -------------------------
## | D E V I L S T A C K |
## -------------------------
##
## Local LAMP/LEMP stack
##
##
## ${VARIABLE:-default} will evaluate to default if VARIABLE is unset or empty in the environment.
## ${VARIABLE-default} will evaluate to default only if VARIABLE is unset in the environment.
View gist:6585b298092a6aade76c64c1a6c27d4c
delete all hidden files -> find . -name . -o -prune -exec rm -rf -- {} +
@progcode
progcode / ssh.md
Last active Jul 10, 2017
Magento2 SSH commands
View ssh.md

Setup Upgrade Using Command Line

php bin/magento setup:upgrade

If you don’t want to remove pub/static files while installing/updating database then use following command.

php bin/magento setup:upgrade --keep-generated

Cache Clean Using Command Line

View magento2less.md

npm install -g grunt-cli

project/magento2/dev/tools/grunt/configs/themes.js

mytheme: {
    area: 'frontend',
    name: 'YourProject/Theme',
    locale: 'en_US',
View clickbot.js
function simulateUserClick(url) {
var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
console.log('send');
}
};
xhttp.open("GET", url,true);
@progcode
progcode / del.md
Last active Jan 16, 2017
WIN - delete temporary files
View del.md

takeown /R /F "%userprofile%\AppData\Local\Temporary Internet Files"

Delete the files in the folder.

del "%userprofile%\AppData\Local\Temporary Internet Files\*"

Delete the subfolders in ‘Temporary Internet Files’

forfiles /P "%userprofile%\AppData\Local\Temporary Internet Files\*" /C "cmd /c if @isdir==TRUE rmdir /S /Q @file"

Application temporary files
@progcode
progcode / Gruntfile.js
Created Sep 27, 2016
Sample Gruntfile for SASS/SCSS
View Gruntfile.js
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
files: {
'style/style.css' : 'sass/style.scss'
}
}
},