Skip to content

Instantly share code, notes, and snippets.

@uakhan
uakhan / bootgrid.css
Created April 24, 2019 17:35
bootsrap 4 grid
/*!
* Generated using the Bootstrap Customizer (https://getbootstrap.com/docs/3.4/customize/)
*/
/*!
* Bootstrap v3.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
@uakhan
uakhan / gist:f5575cc7a12f57f3c03d979866472cfb
Last active December 21, 2018 04:48
ssh wordpress permissions reset for ec2 when you manually install wordpress.
SOURCE: https://community.bitnami.com/t/installing-updating-theme-plugin-on-amazon-aws-bitnami-worpress-installation-failing-with-errors-relating-to-permission-issues/50243/5
I recommend you to restore the permissions/owner configuration by running the commands below:
sudo find /opt/bitnami/apps/wordpress/htdocs -type d -exec chmod 0775 {} \;
sudo find /opt/bitnami/apps/wordpress/htdocs -type f -exec chmod 0664 {} \;
sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/htdocs
Finally restart Apache:
Mar 21, 2018, 1:00 AM EDT - info: [main/index] Existing Pressmatic data does not exist.
Mar 21, 2018, 1:00 AM EDT - info: [main/check-system] Check System: Docker Machine:
{ stdout: '',
stderr: 'Host does not exist: "local-by-flywheel"\n' }
Mar 21, 2018, 1:00 AM EDT - info: [renderer/CheckEnvPage] Check system promise response:
[ undefined, 'machine-does-not-exist' ]
Mar 21, 2018, 1:01 AM EDT - info: [main/docker-create-machine] Starting Docker Machine Creation...
Mar 21, 2018, 1:01 AM EDT - info: [main/docker-create-machine] USING IP: 192.168.95.1/24
Mar 21, 2018, 1:01 AM EDT - info: [main/docker-create-machine] Removing existing Docker Machine
Mar 21, 2018, 1:01 AM EDT - info: [main/docker-create-machine] null 'About to remove local-by-flywheel\nWARNING: This action will delete both local reference and remote instance.\n' 'Error removing host "local-by-flywheel": Host does not exist: "local-by-flywheel"\nCan\'t remove "local-by-flywheel"\n'
public function capture_payment( $order_id ) {
$order = wc_get_order( $order_id );
if ( 'stripe' === ( version_compare( WC_VERSION, '3.0.0', '<' ) ? $order->payment_method : $order->get_payment_method() ) ) {
$charge = get_post_meta( $order_id, '_stripe_charge_id', true );
$captured = get_post_meta( $order_id, '_stripe_charge_captured', true );
if ( $charge && 'no' === $captured ) {
$result = WC_Stripe_API::request( array(
'amount' => $order->get_total() * 100,
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
return apply_filters( 'wc_stripe_settings',
array(
'enabled' => array(
'title' => __( 'Enable/Disable', 'woocommerce-gateway-stripe' ),
'label' => __( 'Enable Stripe', 'woocommerce-gateway-stripe' ),
@uakhan
uakhan / Reports
Last active August 11, 2016 05:06
/* before iniliatinzg highcharts */
Highcharts.setOptions({ // Apply to all charts
chart: {
events: {
beforePrint: function () {
this.oldhasUserSize = this.hasUserSize;
this.resetParams = [this.chartWidth, this.chartHeight, false];
this.setSize(600, 400, false);
},
@uakhan
uakhan / style.css
Created July 14, 2016 06:14
V6: Reponsive fix + crosstab table fix
@font-face {
font-family: 'ProximaNova';
src: url('../fonts/proximanova-light.eot');
src: url('../fonts/proximanova-light.eot?#iefix') format('embedded-opentype'), url('../fonts/proximanova-light.woff') format('woff'), url('../fonts/proximanova-light.ttf') format('truetype'), url('../fonts/proximanova-light.svg#ProximaNova-Light') format('svg');
font-weight: 300;
font-style: normal;
}
@font-face {
font-family: 'ProximaNova';
src: url('../fonts/proximanova-regular.eot');
@uakhan
uakhan / 0_reuse_code.js
Created December 22, 2015 16:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console