Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Tadeusz Stępnikowski versedi

🎯
Focusing
View GitHub Profile
View SublimeStuffCollection.md

My personal Sublime settings

User settings

{
	"always_show_minimap_viewport": true,
	"auto_complete_delay": 20,
	"auto_complete_selector": "source, text, file",
	"auto_complete_triggers":
	[
View magento-code-snippets.md

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@versedi
versedi / MageSnippets.php
Last active Dec 21, 2015
Magento PHP Snippets
View MageSnippets.php
#Debug Layout
<?php Zend_Debug::dump($this->getLayout()->getUpdate()->getHandles()); ?>
##Get Locale Code
<?php echo strtolower(Mage::getStoreConfig('general/country/default')); ?>
## Get Skin URL
<?php echo $this->getSkinUrl('images/logo.png'); ?>
@versedi
versedi / netbeans-macros.md
Last active Aug 29, 2015
Magento Netbeans Macro / Code Templates
View netbeans-macros.md

Macro

Translate *.phtml

cut-to-clipboard "<?php echo $this->__('" paste-from-clipboard "') ?>"

Echo string *.phtml

cut-to-clipboard "<?php echo " paste-from-clipboard " ?>"
@versedi
versedi / .sh
Created Aug 5, 2015
Cygwin + git + Sublime Text 3 commit message
View .sh
#Remember to have environment variable in Windows set also to /usr/local/bin
#File /usr/local/bin/subl with chmod +x, content:
#!/bin/bash
/cygdrive/c/Program\ Files/Sublime\ Text\ 3/sublime_text.exe `cygpath -w $PWD/.git/COMMIT_EDITMSG` -w
#File ~/.gitconfig
[core]
...
editor = subl -w
...
@versedi
versedi / pullrepos.sh
Last active Aug 29, 2015
Update multiple repositories in subdirectories
View pullrepos.sh
#!/bin/bash
find ~me/projects/ -type d -name .git \
| xargs -n 1 dirname \
| sort \
| while read line; do echo $line && cd $line && git pull; done
#If above ain't working (cygwin had some problems with syntax)
@versedi
versedi / Php-fixers.md
Last active Aug 29, 2015
Cygwin + Conemu + Sublime + XAMPP + PHPCS/PHPMd/PHPCBF
View Php-fixers.md

Install XAMPP
Configure PEAR to work with XAMPP
Install into e:/xampp/php
phpcs.bat
phpmd.bat
phpcbf.bat

Install standards into e:/xampp/php/pear/php/codesniffer/standards

~/.bash_aliases

@versedi
versedi / phpcs.sublime-settings
Last active Aug 29, 2015
phpcs.sublime.settings
View phpcs.sublime-settings
{
// Plugin settings
// Turn the debug output on/off
"show_debug": true,
// Which file types (file extensions), do you want the plugin to
// execute for
"extensions_to_execute": ["php"],
@versedi
versedi / sublime-keymap-polish-characters-fix
Last active Nov 23, 2015
Sublime polish latin extended characters fix
View sublime-keymap-polish-characters-fix
[
{ "keys": ["alt+c"], "command": "insert_snippet", "args": {"contents": "ć"} },
{ "keys": ["ctrl+alt+c"], "command": "insert_snippet", "args": {"contents": "ć"} },
{ "keys": ["ctrl+shift+alt+c"], "command": "insert_snippet", "args": {"contents": "Ć"} },
{ "keys": ["alt+s"], "command": "insert_snippet", "args": {"contents": "ś"} },
{ "keys": ["ctrl+alt+s"], "command": "insert_snippet", "args": {"contents": "ś"} },
{ "keys": ["ctrl+shift+alt+s"], "command": "insert_snippet", "args": {"contents": "Ś"} },
{ "keys": ["alt+l"], "command": "insert_snippet", "args": {"contents": "ł"} },
{ "keys": ["ctrl+alt+l"], "command": "insert_snippet", "args": {"contents": "ł"} },
{ "keys": ["ctrl+shift+alt+l"], "command": "insert_snippet", "args": {"contents": "Ł"} }
View Default (Linux).sublime-keymap
[
{ "keys": ["ctrl+d"], "command": "duplicate_line" },
{ "keys": ["ctrl+Shift+d"], "command": "find_under_expand" },
{ "keys": ["ctrl+pagedown"], "command": "next_view_in_stack" },
{ "keys": ["ctrl+pageup"], "command": "prev_view_in_stack" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+y"], "command": "redo"},