Skip to content

Instantly share code, notes, and snippets.

@bagerathan
bagerathan / woo-events.js
Last active October 17, 2025 01:45
[Woocommerce Javascript events] #woo
//Woocommerce Checkout JS events
$( document.body ).trigger( 'init_checkout' );
$( document.body ).trigger( 'payment_method_selected' );
$( document.body ).trigger( 'update_checkout' );
$( document.body ).trigger( 'updated_checkout' );
$( document.body ).trigger( 'checkout_error' );
//Woocommerce cart page JS events
$( document.body ).trigger( 'wc_cart_emptied' );
$( document.body ).trigger( 'update_checkout' );
@gre
gre / README.md
Last active June 24, 2016 19:44
Troubleshooting with cassandra on Mac OSX El Captain
  • Download the tar.gz of Cassandra from http://cassandra.apache.org/download/
  • extract it in your own ~ wherever it makes sense for you (me it's in ~/bin/)
  • Add the cassandra-*/bin/ to your $PATH in your bash profile (me I need to add /Users/gre/bin/apache-cassandra-2.2.3/bin/)
  • Try to run cassandra.
  • If it runs fine you are done.
  • If you get into trouble with an error like Unable to gossip with any seeds or Fatal exception during initialization org.apache.cassandra.exceptions.ConfigurationException: Found system keyspace files, but they couldn't be loaded!
    • edit conf/cassandra.yaml in the extracted cassandra directory
    • comment the line # listen_address: localhost
  • start the cassandra command again.
@raddeus
raddeus / app.js
Last active February 4, 2025 09:42
Basic Express 4.0 Setup with connect-flash
var express = require('express');
var session = require('express-session');
var cookieParser = require('cookie-parser');
var flash = require('connect-flash');
var app = express();
app.use(cookieParser('secret'));
app.use(session({cookie: { maxAge: 60000 }}));
app.use(flash());