Skip to content

Instantly share code, notes, and snippets.

View phpmypython's full-sized avatar

William Wilkerson phpmypython

View GitHub Profile
WITH cohort_dfn_by_refr_channel_acquired_by_week AS (
SELECT
domain_userid,
refr_acquired_medium,
week_start
FROM (
SELECT
domain_userid,
refr_medium AS refr_acquired_medium,
DATE_TRUNC('week',collector_tstamp) as week_start,
@phpmypython
phpmypython / permissionset.sh
Last active December 24, 2016 06:27
WordPress Permissions
find . -type f -name "wp-config-sample.php" -o -name "readme.html" -o -name "README.txt" -o -wholename "wp-admin/install.php" -exec rm -f {} \; &&
find . -type d -exec chmod 0755 {} \; &&
find . -type f -exec chmod 0755 {} \; &&
find . -name "wp-config.php" -exec chmod 600 {} \;
@phpmypython
phpmypython / update_content_url.php
Created July 11, 2017 16:36
Update image paths wordpress
function update_content_url()
{
//provide the url and path that you would like used for image uploads.
return 'http://example.com/wp-content/uploads';
}
add_filter('pre_option_upload_url_path', 'update_content_url');
(function (m) {
/*
* PHP => moment.js
* Will take a php date format and convert it into a JS format for moment
* http://www.php.net/manual/en/function.date.php
* http://momentjs.com/docs/#/displaying/format/
*/
var formatMap = {
d: 'DD',
D: 'ddd',
@phpmypython
phpmypython / 2021_fom_car.xml
Last active July 22, 2022 15:54
These are the xml files defining the values for the multiplayer car in the F1 2022 and 2021 video game for comparison purposes.
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--BXMLLittle-->
<VTF>
<Engine>
<RevsPowerSpline numVertices="19">
<SplineElement x="0" y="0" op="=" />
<SplineElement x="69.9528" y="9281.2381835937485" op="=" />
<SplineElement x="121.655289" y="23500.66640625" op="=" />
<SplineElement x="176.0811" y="44253.966796875" op="=" />
<SplineElement x="247.059937" y="79293.95546875" op="=" />

To gather this data I used the Ego_ERP_Archiver program and analyzed the XML configuration file for the multiplayer car.

The full XML files for 2021 and 2022 can be found at the following links

For ERS deployment, currently the way it works is that you'll deploy a percentage of the power of the ERS which is 120KW, depending on what ERS mode you're in. The breakdown is as follows:

  • Medium uses 15% (18KW)
  • Hotlap uses 60% (72KW)