Skip to content

Instantly share code, notes, and snippets.

View Navds's full-sized avatar

Navalona Ramanantoanina Navds

  • Antananarivo, Madagascar
View GitHub Profile
@Navds
Navds / cool_dev_tools.md
Last active September 3, 2019 01:38
Free Developer Tools (https://bit.ly/2LiFpVl)

ATELIER DU LIBRE 31/08/19: d2d developer tools

What any developer needs in his life:

@Navds
Navds / jenkins_vhost.conf
Created February 1, 2019 08:33
Apache as a Jenkins reverse proxy
<VirtualHost *:80>
ServerName jenkins.navds.intra
ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/
ProxyRequests Off
AllowEncodedSlashes NoDecode
<Proxy http://localhost:8080*>
Order deny,allow
@Navds
Navds / cvimrc
Last active January 8, 2019 03:31
cvimrc chrome sync
set noautofocus
set nativelinkorder
set showtabindices
let mapleader=','
let hintcharacters="asdgqwertzxcvb"
@Navds
Navds / sql_snippets.md
Created December 21, 2018 16:10
Cool sql snippets

Export query result to csv

mysql -hhost -uuser -ppassword database -e "select query" | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > output_file.csv
@Navds
Navds / WritingMagentoModules.md
Created December 4, 2018 11:38 — forked from leek/WritingMagentoModules.md
Writing Modules for Magento 1.x

Writing Magento Modules

All custom modules should have a Namespace and Module Name. These are used below as {Namespace} and {Module}.

Caution: The Magento autoloader is known to have problems with CamelCase namespaces and/or modules between Windows and *nix systems. If your module requires more than one word for either of these, it is best to just concatenate them to avoid any issues (Example: {Namespace}_{Examplemodule}).

Index

@Navds
Navds / magento_extension_best_practice.md
Created November 29, 2018 06:20
Magento extension development best practice

Source: https://magento.stackexchange.com/questions/8344/magento-1-how-to-write-a-custom-extension

  • Always develop with error_reporting on.
  • Always develop with isDeveloperMode set to true. Just add SetEnv MAGE_IS_DEVELOPER_MODE 1 to your httpd.conf file (or corresponding file for Nginx or something else)
  • If the extension is linked to a core functionality add the dependency in the declaration file <Mage_Catalog />
  • If the module is for community use, use community as codepool to give the developers the chance to override some classes without modifying the code directly
  • Put your frontend design files in app/design/frontend/base/default to make them available for all themes.
  • Put your admin design files in app/design/adminhtml/default/default and do not change the admin theme. I may want to change it in one of my modules.
  • Prefix your layout file names and template folder name with the company name to make it easier to isolate them. easylife_articles.xml and app/design/.../easylife_a
@Navds
Navds / GitHub-Forking.md
Created October 14, 2018 13:15 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@Navds
Navds / xpath-cheatsheet.js
Last active June 13, 2018 08:51 — forked from LeCoupa/xpath-cheatsheet.js
XPath Cheatsheet
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
@Navds
Navds / svn.md
Last active July 1, 2019 11:49 — forked from kidpixo/svn.md
SVN Cheatsheet
@Navds
Navds / gitcom.md
Last active May 31, 2018 07:14 — forked from jednano/gitcom.md
Git every day

Git Workflow

Initial Setup

Create an empty git repo or reinitialize an existing one

$ git init