Skip to content

Instantly share code, notes, and snippets.

BloggingTribe.Com
Mautic Cronjob Codes - Last Updated Feb 8, 2018
_____________________________________________________
Disclaimer: This code is not the official documentation from Mautic.org, not is it indorced by Mautic.org. Please use at your own discretion.
Usage:
Step 1: Replace "*" with your directory path to your Mautic Installation
Step 2: create folder inside your Mautic installation called "cron_logs"
Step 3: Copy the code into your Cron Jobs manager.
@Averroes
Averroes / basic.aiml
Created June 18, 2018 10:05 — forked from fvnilo/basic.aiml
PyAIML basis
<?xml version="1.0" encoding="utf-8"?>
<aiml version="1.0.1">
<category>
<pattern>HELLO</pattern>
<template>
<random>
<li>Hi, human !</li>
<li>Hello to you, good person</li>
<li>Hello there !</li>
<li>Ah finally a friend to talk to ! Hello !</li>
@Averroes
Averroes / ohlc.py
Created June 16, 2018 10:56 — forked from lanfon72/ohlc.py
OHLC chart with XlsxWriter.
# extended from http://xlsxwriter.readthedocs.io/example_chart_stock.html
from datetime import datetime
import xlsxwriter
workbook = xlsxwriter.Workbook('chart_ohlc_stock.xlsx')
worksheet = workbook.add_worksheet()
bold = workbook.add_format({'bold': 1})
date_format = workbook.add_format({'num_format': 'dd/mm/yyyy'})
@Averroes
Averroes / crypto-wrong-answers.md
Created May 18, 2018 11:28 — forked from paragonie-scott/crypto-wrong-answers.md
An Open Letter to Developers Everywhere (About Cryptography)
@Averroes
Averroes / latency.txt
Created May 18, 2018 11:26 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@Averroes
Averroes / function.php
Last active April 24, 2018 17:10 — forked from mikejolley/gist:1622409
WooCommerce - Set a custom add to cart URL to redirect to
<?php
function custom_add_to_cart_redirect() {
/**
* Replace with the url of your choosing
* e.g. return 'http://www.yourshop.com/'
*/
return get_permalink( get_option('woocommerce_checkout_page_id') );
}
add_filter( 'woocommerce_add_to_cart_redirect', 'custom_add_to_cart_redirect' );
@Averroes
Averroes / hodl20.py
Created April 19, 2018 18:47 — forked from anthonytxie/hodl20.py
Hodl 20 Rebalancing Algorithm
def calc_allocations(self, date, quantity, cap):
"""Figure out ideal allocations for a given date"""
# {
# coin_name: (percent_allocation, data)
# }
top_market = self.get_top_market(date, quantity)
total_cap = sum([coin.market_cap for coin in top_market])
allocations = [{
@Averroes
Averroes / woocommerce-demo-plugin.php
Created April 6, 2018 18:39 — forked from BFTrick/woocommerce-demo-plugin.php
A demo WooCommerce plugin
<?php
/**
* Plugin Name: WooCommerce Demo Plugin
* Plugin URI: https://gist.github.com/BFTrick/3ab411e7cec43eff9769
* Description: A WooCommerce demo plugin
* Author: Patrick Rauland
* Author URI: http://speakinginbytes.com/
* Version: 1.0
*
* This program is free software: you can redistribute it and/or modify
iMac-de-Pablo:~ Jorge$ ethminer --help
Usage ethminer [OPTIONS]
Options:
Work farming mode:
-F,--farm <url> Put into mining farm mode with the work server at URL (default: http://127.0.0.1:8545)
--farm-recheck <n> Leave n ms between checks for changed work (default: 500).
--no-precompute Don't precompute the next epoch's DAG.
Ethash verify mode:
-w,--check-pow <headerHash> <seedHash> <difficulty> <nonce> Check PoW credentials for validity.