Skip to content

Instantly share code, notes, and snippets.

Removes the magento attribute values from the database

This is only part of the statement, you'll need to first delete the values, then delete the options associated with those values. The statement to delete the options is below this statement.

DELETE value FROM eav_attribute_option_value AS `value` 
INNER JOIN eav_attribute_option AS `options` 
ON options.option_id = `value`.option_id 
WHERE `options`.attribute_id = '139'

Delete attribute options

@lklepner
lklepner / Instructions
Last active April 27, 2016 17:36 — forked from jonathonbyrdziak/Instructions
Magento installation on CentOS
#
# @author Jonathon byrd
#
############################################################
# first things first, set your iptables for a web server. If you jack these
# up you don't want to have to re-install your os after doing much more.
# @see http://www.thegeekstuff.com/2011/06/iptables-rules-examples/
# and
# @see https://help.ubuntu.com/community/IptablesHowTo
#!/bin/sh
##3.5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80
##
## Debian / Linux / Ubuntu / LSB
## Startup script for Express / Node.js application with the forever module
##
##
## A modification of "init.d.lsb.ex" by Nicolas Thouvenin
##
##
@lklepner
lklepner / Backgrid.ClientSideFilterWithPickFilter
Created December 9, 2015 14:33 — forked from martindrapeau/Backgrid.ClientSideFilterWithPickFilter
Extend Backgrid ClientSideFilter with a pick filter, to pre-filter data set. Useful to combine text search with a select, checkboxes or radio buttons filters.
// Subclass Backgrid Filter to pass an extra 'pick' filter
Backgrid.ClientSideFilterWithPickFilter = Backgrid.Extension.ClientSideFilter.extend({
pickFilter: null,
setPickFilter: function (attrs) {
this.pickFilter = attrs;
this.search();
return this;
},
makeMatcher: function (query) {
@lklepner
lklepner / jquery.cach-inputs.js
Last active November 30, 2019 16:16 — forked from martindrapeau/jquery.cach-inputs.js
jQuery plugin to cache HTML inputs using local storage. Restores them upon next page load.
// Cache user inputs into HTML5 local storage. Restore them upon next page load.
// Usage:
// $('body').CacheInputs();
//
// Will store stringified JSON in local storage, against the key you specify
// or 'cache-inputs' if you omit it. See settings below.
//
// Author: Martin Drapeau
//
// Update 12/14/2015 - Added execution of options param to function as a callback when values have finished populating
@lklepner
lklepner / background.js
Created March 3, 2016 16:28 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@lklepner
lklepner / background.js
Last active March 3, 2016 17:14
MapWarper Enlarger
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'enlarge.js'
});
});
sudo apt-get install avahi-daemon
sudo apt-get install netatalk
#!/bin/bash
#
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
# from time to time
# Usage: checkpoint.sh
# The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up.
# Or, make an Automator action and paste the script.
# You will need sudo power, of course
#

Keybase proof

I hereby claim:

  • I am lklepner on github.
  • I am lklepner (https://keybase.io/lklepner) on keybase.
  • I have a public key ASAu5Ws2rMu0WDc2TcTQ9mAzmBNFqA2WJBbRtZbkHXbxQgo

To claim this, I am signing this object: