Skip to content

Instantly share code, notes, and snippets.

View mrbusche's full-sized avatar

Matt Busche mrbusche

View GitHub Profile
--------- beginning of /dev/log/system
11-02 09:29:04.156 W/ActivityManager( 682): Process com.android.phone has crashed too many times: killing!
11-02 09:29:04.406 I/ActivityManager( 682): START u0 {act=android.intent.action.SEND typ=application/zip flg=0x1 cmp=android/com.android.internal.app.ResolverActivity (has clip) (has extras)} from pid 3447
11-02 09:29:04.726 I/ActivityManager( 682): Start proc com.android.inputmethod.latin for service com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService: pid=4085 uid=10027 gids={50027, 1015, 1028}
11-02 09:29:04.756 I/ActivityManager( 682): Start proc system:ui for activity android/com.android.internal.app.ResolverActivity: pid=4093 uid=1000 gids={41000, 1015, 1028, 3002, 3001, 3003, 3007}
11-02 09:29:08.280 I/ActivityManager( 682): Process com.android.phone (pid 4059) has died.
11-02 09:29:08.300 I/ActivityManager( 682): Start proc com.android.phone for restart com.android.phone: pid=4154 uid=1001 gids={41001, 3002, 3001, 3003, 1006, 1015, 102
@mrbusche
mrbusche / gist:8239414
Created January 3, 2014 15:12
need help refactoring
<cfset InsStateTblFound="1">
<cftry>
<cfquery name="Temptable" DATASOURCE="PLDropdowns">
SELECT * FROM #GeneralQuery.InsState#Table
</cfquery>
<cfcatch>
<cfset InsStateTblFound="0">
</cfcatch>
</cftry>
window.onbeforeunload = function() {
return 'You are exiting before completing the payment process. Failure to secure a down payment at submittal could impact the account creation timing.';
}
$(function($) {
$('a[href^="javascript:"],input').click(
function() {
window.onbeforeunload = null;
}
)
});
var activityHistory = billingHistory.getBillingAccountDTOs()[1].getActivityItemDTOList();
// sort the array descending
var start = getTickCount();
arraySort(activityHistory,
function (history1, history2){
return compare(history1.getActivityEffectiveDate(), history2.getActivityEffectiveDate());
}
);
//try to find a batch Number
var batchNumber = '';
@mrbusche
mrbusche / gist:e6f3b93a51715654edaf
Created June 2, 2014 14:19
Bookmarklet to check for duplicate IDs
javascript:(function () { var ids = {}; var found = false; $('[id]').each(function() { if (this.id && ids[this.id]) { found = true; console.warn('Duplicate ID #'+this.id); } ids[this.id] = 1; }); if (!found) console.log('No duplicate IDs found'); })();
@mrbusche
mrbusche / gist:5da432a486962f8b9b1c
Created June 11, 2014 02:38
Batch insert records to a database
<cfscript>
totalrows = 5000; // this would come from a structCount or something similar
rowsPerInsert = 210;
//this creates a struct with alternating values of true/false for test purposes
stRows = {};
for(i=1; i<=totalRows; i++) {
stRows[i] = i MOD 2 ? true : false;
}
</cfscript>
<cfoutput>
@mrbusche
mrbusche / duplicateIDCheckerJavaScript
Created April 14, 2015 02:09
Checking an HTML page for duplicate IDs using JavaScript
var allElements = document.getElementsByTagName("*");
var allIds = {};
var found = false;
for (var i = 0, n = allElements.length; i < n; ++i) {
var id = allElements[i].id;
if (id) {
if (allIds[id] === undefined) {
allIds[id] = 1;
} else {
found = true;
@mrbusche
mrbusche / delete old git branches locally
Last active March 31, 2018 02:08
Delete deleted git branches locally
git remote update origin --prune && git branch -vv | grep gone] | awk '{print $1}' | xargs git branch -D
@mrbusche
mrbusche / gist:524eda3c26f71986475e0c958fdb5222
Created August 23, 2017 02:09
jira hide assigned tickets
//load in jquery
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
//hide assigned tickets
$('.ghx-avatar').each(function() {
var str = $(this)[0].outerHTML;
if (str.indexOf("Assignee:") >= 0) {
$(this).parent().hide();
@mrbusche
mrbusche / jira hide specific words from view
Created August 23, 2017 02:10
jira hide specific words from view
//remove anything with the title "words" from jira view
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
$('.ghx-inner').each(function() {
var str = $(this).text().replace(/ /g, '').toUpperCase();
if (str.indexOf("words") >= 0) {
$(this).parent().parent().parent().parent().hide();
}