Skip to content

Instantly share code, notes, and snippets.

View baki250's full-sized avatar

B Toktas baki250

  • London, UK
View GitHub Profile
Read cookie
This function reads a cookie from the visitor's browser and returns the value.
Example Javascript
/*
* Usage
* This function will return the value of the cookie name passed in as the argument.
*
<?php
/*
* This script deletes duplicate images and imagerows from the database of which the images are not present in the filesystem.
* It also removes images that are exact copies of another image for the same product.
* And lastly, it looks for images that are on the filesystem but not in the database (orphaned images).
*
* This script can most likely be optimized but since it'll probably only be run a few times, I can't be bothered.
*
* Place scripts in a folder named 'scripts' (or similar) in the Magento root.
server { listen 80;
server_name example.com;
access_log /var/log/example.com/nginx.access.log;
error_log /var/log/example.com/nginx.error.log;
root /var/www/apps/example.com/public;
charset utf-8;
location / {
rewrite ^ https://$host$request_uri? permanent;
}
//Allowing CORS (Cross-Origin Resource Sharing) requests from
// grunt server, put this into Gruntfile.js
grunt.initConfig({
connect: {
livereload: {
options: {
port: 9000,
hostname: 'localhost',
middleware: function (connect) {
return [

#Identifiers provided by the ECMAScript standard.

exports.reservedVars = {
	arguments : false,
	NaN       : false
};

exports.ecmaIdentifiers = {
	Array              : false,

Boolean : false,

#AngularJS Application List Here is a list of some Angular Free Application / snippets to help you out with your projects

angular git://github.com/angular/bower-angular.git
angular-mocks git://github.com/angular/bower-angular-mocks.git
angular-resource git://github.com/angular/bower-angular-resource.git
angular-scenario git://github.com/angular/bower-angular-scenario.git
angular-cookies git://github.com/angular/bower-angular-cookies.git
angular-sanitize git://github.com/angular/bower-angular-sanitize.git

angular-bootstrap git://github.com/angular-ui/bootstrap-bower.git

#CSS List normalize-css git://github.com/necolas/normalize.css.git bootstrap.css git://github.com/bowerjs/bootstrap.git require-css git://github.com/guybedford/require-css.git animate.css git://github.com/daneden/animate.css.git bootstrap-css git://github.com/jozefizso/bower-bootstrap-css.git normalize-scss git://github.com/appleboy/normalize.scss.git select2-bootstrap-css git://github.com/t0m/select2-bootstrap-css.git css_browser_selector git://github.com/verbatim/css_browser_selector.git normalize.scss git://github.com/JohnAlbin/normalize-scss.git

#jQuery Application / Snippet List Here is a list of some jQuery Free Application/snippets to help you out with your projects

jquery git://github.com/jquery/jquery.git
jquery-ui git://github.com/components/jqueryui
jquery.cookie git://github.com/carhartl/jquery-cookie.git
jquery-placeholder git://github.com/mathiasbynens/jquery-placeholder.git
jquery-file-upload git://github.com/blueimp/jQuery-File-Upload.git
jasmine-jquery git://github.com/velesin/jasmine-jquery

jquery.ui git://github.com/jquery/jquery-ui.git

PhoneGap Application List

angular-phonegap-ready git://github.com/btford/angular-phonegap-ready.git
phonegap git://github.com/phonegap/phonegap.git
angular-phonegap-accelerometer git://github.com/btford/angular-phonegap-accelerometer.git
angular-phonegap git://github.com/mstaessen/bower-angular-phonegap.git
angular-phonegap-geolocation git://github.com/btford/angular-phonegap-geolocation.git
angular-phonegap-notification git://github.com/btford/angular-phonegap-notification.git
phonegap-desktop git://github.com/jxp/phonegap-desktop.git

phonegap.shim git://github.com/makesites/phonegap-shim.git

@baki250
baki250 / gist:5590680
Last active December 13, 2019 04:12 — forked from hightemp/gist:2387916

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex