Skip to content

Instantly share code, notes, and snippets.

View mystix's full-sized avatar

Marc mystix

  • Singapore
View GitHub Profile
SET @entityid = '3';
SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type'
FROM catalog_category_entity e
JOIN catalog_category_entity_varchar eav
ON e.entity_id = eav.entity_id
JOIN eav_attribute ea
ON eav.attribute_id = ea.attribute_id
WHERE e.entity_id = @entityid
UNION
@mystix
mystix / nginx.conf
Last active August 29, 2015 14:07 — forked from plentz/nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@mystix
mystix / gist:428523
Created June 7, 2010 10:45
Rapidshare unpacker
#!/bin/bash
for FILE in $(find . -type f -regex '.*\.rar$'); do
mv $FILE .
done
@mystix
mystix / OSX - Firefox command line launcher.sh
Created June 24, 2010 08:18
OSX - Firefox command line launcher
#!/bin/bash
/Applications/Firefox.app/Contents/MacOS/firefox-bin -ProfileManager > /dev/null 2>&1 &
@mystix
mystix / gem-installer.sh
Created August 20, 2010 06:25
Ruby + Rails setup
#!/bin/bash
RUBY_HEAD=1.9.3
# ------- NOTE: RUN THE rvm-installer.sh SCRIPT FIRST -------
# notes:
# - --with-gcc=clang required for OSX Lion
# - readline required to fix forward-delete in irb (see http://anthonymcook.com/post/9304734590/get-the-delete-key-working-in-irb-on-osx-with-two-lines)
rvm install $RUBY_HEAD --with-gcc=clang --with-readline-dir=`brew --prefix readline`
@mystix
mystix / form.html
Last active September 9, 2015 13:48 — forked from gosseti/form.html
A credit card form using jQuery.payment
<form accept-charset="UTF-8" action="/payment" class="cardInfo" method="post">
<fieldset class="cardInfo__cardDetails">
<div class="form-row cardInfo__cc-num">
<label for="cc-num"><abbr title="required">*</abbr><span>Card Number</span></label>
<div class="cc-num__wrap">
<!-- using type="tel" because type="number" doesn’t pass HTML5 form validation with jQuery.payment formatting -->
<input id="cc-num" type="tel" class="paymentInput cc-num" placeholder="•••• •••• •••• ••••" autocompletetype="cc-number" required="required">
<span class="card" aria-hidden="true"></span>
@mystix
mystix / .aliases
Created September 27, 2010 19:11
OSX dot config files
# ls shortcuts
alias ls='ls -G'
alias ll='ls -Flh'
# git shortcuts
function git_discard {
# note: only works in zsh shell
echo "Discard all changes? "
read -q REPLY
@mystix
mystix / mime.types
Created August 22, 2011 04:40
Start Tomcat 7.x automatically on OSX using JSVC 1.0.8 (must be run behind nginx)
types {
text/html html htm shtml;
text/css css;
text/xml xml;
text/cache-manifest manifest;
image/gif gif;
image/jpeg jpeg jpg;
application/x-javascript js;
application/atom+xml atom;
@mystix
mystix / org.eclipse.jetty.plist
Created August 23, 2011 06:23
Jetty 6 & 7 launchd plists for OSX
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"><!-- NOTE: place this file in /Library/LaunchDaemons -->
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>org.eclipse.jetty</string>
<key>ServiceDescription</key>
<string>Jetty 7</string>
@mystix
mystix / Ext.data.proxy.WebDB.js
Created September 11, 2011 05:14 — forked from tuxcanfly/Ext.data.proxy.WebDB.js
Sencha touch proxy for web database
/**
* @author Grgur Grisogono
*
* WebSQL proxy connects models and stores to local WebSQL database.
*
* WebSQL is only available in Chrome and Safari at the moment.
*
* Version: 0.11
*
* TODO: respect sorters, filters, start and limit options on the Operation; failover option for remote proxies, ..