This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"folders": [ | |
{ | |
"path": ".", | |
"follow_symlinks": true | |
} | |
], | |
"settings": { | |
"xdebug": { | |
"path_mapping": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mount volumes using SSHFS from a remote | |
# Author: Jabran Rafique <hello@jabran.me> | |
# License: MIT License | |
#!/bin/bash | |
sshfs {REMOTE}:{PATH} {HOST_PATH} -o follow_symlinks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Converts the integer to binary and outputs list of integers that are power of 2 | |
* | |
* @author: Jabran Rafique <hello@jabran.me> | |
* @param: integer $decimal | |
* @return: string | |
*/ | |
function get_special_binary( $decimal ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @link http://adripofjavascript.com | |
*/ | |
// Example 1 | |
(function(console) { | |
function factoral(num) { | |
if (num < 0) throw new Error('Bad input!'); | |
if (num % 1 !== 0) throw new Error('That\'s NaN!'); | |
if (num === 0 || num === 1) return 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<snippet> | |
<content><![CDATA[ | |
/** | |
* Get ${1/(.*)/\u$1/:[ Prop name ]} | |
* ${4:[description]} | |
* | |
* @return ${3:[type]} | |
*/ | |
public function get${1/(.*)/\u$1/:[ Prop name ]}() { | |
return \$this->${1:[ Prop name ]}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save the file to "{Sublime Packages}/PHP Getters and Setters/user_templates.py" | |
# Then add following "user config" in Sublime Text: | |
# | |
# { | |
# "registerTemplates" : [ "customTemplate" ], | |
# "template" : "customTemplate" | |
# } | |
# | |
# Restart Sublime Text | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save in .git/hooks/prepare-commit-msg | |
# | |
# This means that current branch was branched | |
# out from JIRA/Bitbucket and has a JIRA | |
# ticket number in its name. | |
JIRA=$(cat .git/HEAD | grep -Eo "[A-Z]+-[0-9]+") | |
echo "$JIRA" >> "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Foo\Bar\Entity; | |
use Doctrine\ORM\EntityManager; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* BaseEntity | |
* |