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
#!/bin/bash | |
# based on the script by Bojan Popic https://gist.github.com/bojanpopic/2c3025d2952844de1dd0 | |
# Gets all issues form a repo. Since Pull Requests are also Issues in Github internally, these are also included. | |
repo="organization/repoName" # put the name of the repo here. Usually it is like this: organization/repo-na$ | |
username="myuser" # your github username | |
password="mypassword" # your github password | |
# this script can be used on public repos with any user's credentials, you don't have to own the repo! |
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
<?php | |
class CustomAccountsController extends SugarController | |
{ | |
public function action_displaypassedids() { | |
if ( !empty($_REQUEST['uid']) ) { | |
$recordIds = explode(',',$_REQUEST['uid']); | |
foreach ( $recordIds as $recordId ) { | |
$bean = SugarModule::get($_REQUEST['module'])->loadBean(); | |
$bean->retrieve($recordId); |
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
<?php | |
require_once('include/MVC/View/views/view.list.php'); | |
class CustomAccountsViewList extends ViewList | |
{ | |
/** | |
* @see ViewList::preDisplay() | |
*/ | |
public function preDisplay() |
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
jssource/src_files/include/javascript/sugar_3.js | |
Line 2432 | |
sugarListView.prototype.toggleSelected = function () { | |
var numSelected = sugarListView.get_num_selected(); | |
var selectedRecords = document.getElementById("selectedRecordsTop"); | |
var selectActions = document.getElementById("selectActions"); | |
var selectActionsDisabled = document.getElementById("selectActionsDisabled"); |
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
Dumps backtrace into log, with chronological order | |
Call with | |
$GLOBALS['log']->debug(generateCallTrace()); | |
---------------- | |
function generateCallTrace() | |
{ |
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
https://web.archive.org/web/20140116145925/http://www.eggsurplus.com/home/content/populate-a-dropdown-from-the-database/ |
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
http://stackoverflow.com/questions/927358/git-undo-last-commit | |
Undo a commit and redo | |
$ git commit ... | |
$ git reset --soft HEAD^ (1) | |
$ edit (2) | |
$ git commit -a -c ORIG_HEAD (3) | |
This is most often done when you remembered what you just committed is incomplete, or you misspelled your commit message, or both. Leaves working tree as it was before "reset". |
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
<?php | |
//xdebug_break(); | |
if (!defined('sugarEntry') || !sugarEntry) die ('Not a Valid Entry Point!'); | |
$date= new DateTime(); | |
//chdir('/opt/bitnami/apps/suitecrm/htdocs/'); | |
echo 'School Importer started at '; | |
echo $date->format('r').'<br>'; | |
echo '-------------------------------------------------------------------------------------------------------------------------------------<br>'; |
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
#! /usr/bin/env php | |
<?php | |
# Stuff we have to do | |
if(!defined('sugarEntry'))define('sugarEntry', true); | |
function usage() { | |
global $argv; | |
return "\n" . $argv[0] . " <path to sugar>\n"; | |
} |
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
<?php | |
namespace Pokus; | |
class Exception extends \Exception | |
{ | |
} | |
function tttt($string) | |
{ | |
try { |
OlderNewer