Skip to content

Instantly share code, notes, and snippets.

@theritesite
theritesite / PY0101EN-1-1-Types.ipynb
Created February 5, 2021 17:30
Created on Skills Network Labs
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@theritesite
theritesite / export-to-csv-escaping.php
Last active April 26, 2019 16:47
While exporting to CSV, its important to escape the following characters: "@, +, -, =" -- these characters can and may start a command in spreadsheets that can then cause CSV injection with some serious security concerns. Depending on the use of this generated CSV, there is varying security concerns, most if not all harm found in being opened in…
<?php
/**
* replace the lines that have the following statement:
* $data[] = '"' . str_replace( '"', '""', $value ) . '"';
*/
$char_start = substr( $value, 0, 1 );
if( $char_start === '@' || $char_start === '+' || $char_start === '-' || $char_start === '=' ) {
$value = "'" . $value;
}
@theritesite
theritesite / trs-edd-gdu-fix.php
Last active April 2, 2024 18:42
EDD Git Download Updater class/process-file.php update for pantheon compatibility. This whole gist (disregarding the <?php ?> tags) should replace the EDD_GIT_Download_Updater_Process_File::unzip() function.
<?php
/**
* "Iteratively" copy files to replace rename function
*
* This is used for Pantheon and Pressable compatibility
*
* @param string $src
* @param string $dst
* @return boolean $new_file
*/
@theritesite
theritesite / SketchSystems.spec
Last active September 22, 2018 03:24
Rite Reports&
Rite Reports&
Screen
Date State*
click customers -> Customer State
click settings -> Settings State
Customer State
click date -> Date State
click settings -> Settings State
Settings State
click date -> Date State