This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
Drupal.behaviors.appointment = { | |
attach: function(context, settings) { | |
//Begin my code | |
function arrayContains(needle, arrhaystack) | |
{ | |
return (arrhaystack.indexOf(needle) > -1); | |
} | |
var statelist=new Array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data2= new Array(); | |
var items= new Array(); | |
$.ajax({ | |
dataType: "jsonp", | |
cache: true, | |
url: 'http://api.wunderground.com/api/c901ba8827136492/history_20000405/q/CA/San_Francisco.json', | |
data: data2, | |
success: function(data2){ // do something here | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.drush/drush.ini: | |
memory_limit = 128M | |
error_reporting = E_ALL | E_NOTICE | E_STRICT | |
display_errors = stderr | |
in html folder file name php5.ini: | |
expose_php = Off | |
max_input_time = 60 | |
variables_order = "EGPCS" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param $obj | |
* @param $field | |
* @param $value | |
* | |
* @return bool|null | |
*/ | |
function searchJson($obj, $field, $value) { | |
$item=NULL; | |
foreach($obj as $struct) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mymodule_form_node_form_alter(&$form, FormStateInterface $form_state) { | |
// For entity builders. | |
kint($form['#form_id']); | |
if($form['#form_id'] == 'node_page_edit_form') { | |
foreach (array_keys($form['actions']) as $action) { | |
if ($action != 'preview' && isset($form['actions'][$action]['#type']) && $form['actions'][$action]['#type'] === 'submit') { | |
$form['actions'][$action]['#submit'][] = 'mymodule_node_form_submit'; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def IV = Imp_Volatility(); | |
def R = ((IV / IV[1]) - 1); | |
AddLabel(1, AsPercent(R), if R > R[1] then Color.Green else Color.Red); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################# | |
# ER Labels | |
################# | |
def daysBefore = 100; | |
def erInDays = AbsValue(GetEventOffset(Events.EARNINGS, 0)); | |
def before = Sum(HasEarnings(), daysBefore)[-daysBefore]; | |
AddLabel(Yes, IF before THEN "ER: "+erInDays+" days" ELSE "ER: No", IF before THEN Color.RED ELSE Color.GREEN); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getUserIP() { | |
$ipaddress = ''; | |
if (isset($_SERVER['HTTP_CLIENT_IP'])) | |
$ipaddress = $_SERVER['HTTP_CLIENT_IP']; | |
else if(isset($_SERVER['HTTP_X_FORWARDED_FOR'])) | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR']; | |
else if(isset($_SERVER['HTTP_X_FORWARDED'])) | |
$ipaddress = $_SERVER['HTTP_X_FORWARDED']; | |
else if(isset($_SERVER['HTTP_X_CLUSTER_CLIENT_IP'])) | |
$ipaddress = $_SERVER['HTTP_X_CLUSTER_CLIENT_IP']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function luvnotes_custom_page_attachments(array &$attachments) { | |
$attachments['#attached']['library'][] = 'luvnotes_custom/luvnotes_custom'; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: d8dev | |
recipe: drupal8 | |
config: | |
php: '7.3' | |
via: nginx | |
webroot: web | |
database: mariadb:10.3 | |
xdebug: false | |
tooling: |