Skip to content

Instantly share code, notes, and snippets.

View udaragangabadage's full-sized avatar
🏴‍☠️
CTF

Udara Gangabadage udaragangabadage

🏴‍☠️
CTF
View GitHub Profile
@udaragangabadage
udaragangabadage / index.html
Created October 18, 2017 15:00
MaterializeCSS Multi-Column Card Flow
<div class="container">
<div class="row">
<div class="col s12">
<h2 class='text-center'>Multi-column <a href="http://materializecss.com">MaterializeCSS</a> card flow</h2>
<h4 class='text-center grey-text lighten-3'>
By <a href="https://twitter.com/michaellnorth">@MichaelLNorth</a>
</h4>
</div>
</div>
<div class="row">
//To start/stop apache server
$ sudo apachectl start $ sudo apachectl stop
//To Check apache version
$ httpd -v
//To open httpd.conf
/** @license React v16.0.0
* react.development.js
*
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
(function (global, factory) {
/** @license React v16.0.0
* react-dom.development.js
*
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
(function (global, factory) {
// JSX - JavaScript XML
var app ={
title: 'Focus App',
subtitle: 'The TODO App',
options: ['One', 'Two']
}
var template = (
<div>
References: https://gist.github.com/noelboss/3fe13927025b89757f8fb12e9066f2fa
More info: https://www.digitalocean.com/community/tutorials/how-to-use-git-hooks-to-automate-development-and-deployment-tasks
https://www.youtube.com/watch?v=6mYtJu0E47U
[misc commands deluser newuser]
The following steps is for Developers to push their code from their local machine, to their server with git, and let git auto
pull the update to your remote folder. How it works:
- From your local machine, you do your normal coding. When done, you push your new code to git
- Git then updates your local machine, and push it to your server's git
- Git on your server gets the new update, and push it to your server's working folder
@udaragangabadage
udaragangabadage / can't disable auto close brackets on JNotebook
Created January 4, 2021 10:50
can't disable auto close brackets on JNotebook
I agree that autoclosing brackets can be tricky, but not that it should be removed entirely.
Here's how you can set it in frontend config with the current code:
# Run this in Python once, it should take effect permanently
from notebook.services.config import ConfigManager
c = ConfigManager()
c.update('notebook', {"CodeCell": {"cm_config": {"autoCloseBrackets": False}}})
To restore the default, do the same with None in place of False.
<p>
We accept:
</p>
<div class="payment-methods">
<img src="https://colabrio.ams3.cdn.digitaloceanspaces.com/stockie/mastercard.svg" alt="">
<img src="https://colabrio.ams3.cdn.digitaloceanspaces.com/stockie/visa.svg" alt="">
<img src="https://colabrio.ams3.cdn.digitaloceanspaces.com/stockie/paypal.svg" alt="">
<img src="https://colabrio.ams3.cdn.digitaloceanspaces.com/stockie/amazon.svg" alt="">
<img src="https://colabrio.ams3.cdn.digitaloceanspaces.com/stockie/jcb.svg" alt="">
</div>
@udaragangabadage
udaragangabadage / wc-custom-sorting-options-asc-dec.php
Created September 19, 2021 22:33 — forked from woogists/wc-custom-sorting-options-asc-dec.php
[Frontend Snippets] Custom sorting options (asc/desc)
/**
* Add custom sorting options (asc/desc)
*/
add_filter( 'woocommerce_get_catalog_ordering_args', 'custom_woocommerce_get_catalog_ordering_args' );
function custom_woocommerce_get_catalog_ordering_args( $args ) {
$orderby_value = isset( $_GET['orderby'] ) ? wc_clean( $_GET['orderby'] ) : apply_filters( 'woocommerce_default_catalog_orderby', get_option( 'woocommerce_default_catalog_orderby' ) );
if ( 'random_list' == $orderby_value ) {
$args['orderby'] = 'rand';
$args['order'] = '';
$args['meta_key'] = '';