This file contains hidden or 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
| $buttons: ( | |
| info: blue, | |
| success: green, | |
| warning: yellow, | |
| danger: red | |
| ); | |
| .btn{ | |
| @each $btn-type, $btn-colour in $buttons { | |
| &.btn-#{$btn-type} { |
This file contains hidden or 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
| function overloadMethod(object, name, fn){ | |
| if(!object._overload){ | |
| object._overload = {}; | |
| } | |
| if(!object._overload[name]){ | |
| object._overload[name] = {}; | |
| } | |
| if(!object._overload[name][fn.length]){ |
This file contains hidden or 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
| var user = { | |
| name: "Rahul Mhatre", | |
| whatIsYourName: function() { | |
| console.log(this.name); | |
| } | |
| }; | |
| user.whatIsYourName(); // Output: "Rahul Mhatre", | |
| var user2 = { | |
| name: "Neha Sampat" |
This file contains hidden or 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 | |
| class fakeString | |
| { | |
| private $str; | |
| function __construct($str = null) | |
| { | |
| $this->str = $str; | |
| } |
This file contains hidden or 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
| public function getTranslations() | |
| { | |
| $dir = '../resources/lang/en'; | |
| $files = array_diff(scandir($dir), array('.', '..')); | |
| $callback = function($element) { | |
| return explode(".", $element)[0]; | |
| }; |
This file contains hidden or 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
| .loader { | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; | |
| -webkit-transform: translateX(-50%) translateY(-50%); | |
| -ms-transform: translateX(-50%) translateY(-50%); | |
| transform: translateX(-50%) translateY(-50%); | |
| } | |
| /* Static Shape */ |
This file contains hidden or 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
| (function($) { | |
| $(document).on('ready', function() { | |
| $('.back-to-top').on('click', function(e) { | |
| e.preventDefault(); | |
| $("html, body").animate({ | |
| scrollTop: 0 | |
| }, 700); | |
| }); | |
This file contains hidden or 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
| class Manager | |
| { | |
| private static $instance; | |
| public static function get_instance() | |
| { | |
| if (!isset(self::$instance)) { | |
| $class_name = __CLASS__; | |
| self::$instance = new $class_name; |
This file contains hidden or 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
| class A | |
| { | |
| const foo = 'bar'; | |
| public function getConstant( $const ) | |
| { | |
| return constant('self::' . $const); | |
| } | |
| } |
This file contains hidden or 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
| curl -X POST "https://magento.host/index.php/rest/V1/integration/customer/token" \ | |
| -H "Content-Type:application/json" \ | |
| -d "{"username":"customer1@example.com", "password":"customer1pw"}" |