Skip to content

Instantly share code, notes, and snippets.

View bkonia's full-sized avatar

bkonia

View GitHub Profile
<?php
define("PATH_HOME_SOURCE", "/path/to/your/top/level/source/directory"); // The top-level directory to import from. Use forward slashes.
define("PATH_HOME_NOTABLE", "/path/to/your/top/level/notable/directory"); // The path to your top-level Notable directory. Use forward slashes.
// Do not modify anything below this line, unless you know what you're doing!
$pathHomeSource = rtrim(PATH_HOME_SOURCE, "/");
if (!is_dir($pathHomeSource)) {
echo "Source directory not found. Aborting!";
exit();
}
@bkonia
bkonia / embed_prescientsignals.html
Last active July 19, 2018 18:42
Embed PrescientSignals Charts in iFrame
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
<script src="https://www.prescientrading.com/wp-content/plugins/advanced-iframe/js/ai_resize.js"></script>
<div id="iframe-pt-overlay" style="position:fixed;top:0;left:0;height:100%;width:100%;background:black;opacity:0.7;z-index:2147483646"></div>
<div id="iframe-pt-loader" style="position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);z-index:2147483647">
<i class="fas fa-cog fa-spin" style="font-size:80px;color:#ccc"></i>
</div>
<iframe id="iframe-pt" src="https://www.prescientrading.com/charts-embedded" style="visibility:hidden;border:none;height:0;width:0;max-width:100%;max-height:100%;min-width:100%;min-height:100%" scrolling="no" seamless="seamless" onload="hideLoader()">Charts provided courtesy of <a href="https://www.prescientrading.com">PrescienTrading</a></iframe>
<script src="https://www.prescie
@bkonia
bkonia / bss_to_wordpress.php
Created January 27, 2018 23:45
BSS to WordPress - Automatically Publishes Bootstrap Studio Exports to WordPress
#!/usr/local/bin/php
<?php
/* This script automatically publishes BSS exports to WordPress.
* Install Composer from https://getcomposer.org/ . Composer needs to be installed on your local computer where BSS is installed, NOT on the server.
* Use Composer to install QueryPath (also on your local computer), following the instructions at https://github.com/technosophos/querypath
* On the server, install the JSON Basic Authentication WordPress plugin from https://github.com/WP-API/Basic-Auth
* Create an ini file in the bss_exports parent directory, containing values for base_url, wp_username, wp_password.
* BSS automatically creates an assets folder in the export directory. This folder contains subfolders for css, images, js, etc... To automatically upload assets, provide ini values for ssh_username, ssh_host, ssh_path (file system path to your public web directory with no trailing slash)
* In BSS, create a meta tag for each page you want to publish.