Skip to content

Instantly share code, notes, and snippets.

View jburditt's full-sized avatar

Jebb Burditt jburditt

View GitHub Profile
@jburditt
jburditt / jquery.serializeToJSON.js
Created September 28, 2023 17:09
Fork of jquery.serializeToJSON.js
/**
* serializeToJSON jQuery plugin
* https://github.com/raphaelm22/jquery.serializeToJSON
* @version: v1.4.1 (October, 2019)
* @author: Raphael Nunes
*
* Created by Raphael Nunes on 2015-08-28.
*
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
*/
@jburditt
jburditt / InvokeCall.ps1
Last active September 12, 2023 15:20
Powershell Stop on error and silence warnings
function Invoke-Call {
param (
[scriptblock]$ScriptBlock,
[string]$ErrorAction = $ErrorActionPreference,
[string]$WarningAction = $WarningPreference
)
$WarningPreference = $WarningAction
& @ScriptBlock
if (($lastexitcode -ne 0) -and $ErrorAction -eq "Stop") {
exit $lastexitcode
@jburditt
jburditt / .bash_profile
Last active May 9, 2024 18:30
Mac bash prompt
# \[\033[32m\] green
# \w working directory
# \[\033[0m\] default color
export PS1="\[\033[32m\]\w \[\033[0m\]$ "
# to edit .bash_profile on git for windows
# cd ~
# touch .bashrc
# vi .bashrc
# i #insert mode
@jburditt
jburditt / git-prompt.sh
Created January 4, 2022 20:29
Git Bash prompt - Copied from C:\Program Files\Git\etc\profile.d\git-prompt.sh. Place in ~/.config/git/git-prompt.sh
if test -f /etc/profile.d/git-sdk.sh
then
TITLEPREFIX=SDK-${MSYSTEM#MINGW}
else
TITLEPREFIX=$MSYSTEM
fi
if test -f ~/.config/git/git-prompt.sh
then
. ~/.config/git/git-prompt.sh
network = <network_name>
repository = <repository_path>
# works on Windows (Git Bash, Powershell, Command Prompt) and Mac (bash, zsh, Powershell)
path := ${PWD}
ifeq ($(path),)
path := ${CURDIR}
endif
# let's make makefile make no files
#.PHONY: build-default $(MAKECMDGOALS)
@jburditt
jburditt / AndroidRecordLogs.bat
Last active September 22, 2020 19:25
Android ADB logcat
REM first step is to clear the logs. Once you do this try to reproduce the error and then write logs ASAP to limit the amount of noisy logs recorded
REM clear the logs
abd logcat -c
REM write logs to file, tag format with priority Info or higher and exclude specified tag names
REM adb logcat -d > logs.txt -v tag *:I -e "^(?!.*(TagToExcludeExpr|ViewRootImpl*)).*$"
adb logcat -d > logs.txt -v tag TelephonyProvider:W FaceWidgetCalendarManager:W SurfaceFlinger:W netd:W PersonaServiceHelper:W SamsungAlarmManager:W WindowManager:W InputDispatcher:W InputReader:W sensors-hal:W WifiConnectivityMonitor:W BugleRcsEngine:W GameTools:W InputDispatcher:W CameraService:W chatty:W netd:W .game.gametool:W AllShare(ASF_DMC):W *:I
@jburditt
jburditt / ErrorHelper.js
Last active March 29, 2019 00:11
ExtJs get validation errors from from
var fields = form.getFields();
var errorDetails = '';
fields.each(function (field) {
var errors = field.getErrors();
for (var i = 0; i < errors.length; i++) {
errorDetails += errors[i] + '<br>';
}
});
@jburditt
jburditt / AutofacMvxIocProvider.cs
Created March 13, 2019 04:27
Add Autofac to MvvmCross WPF
using Autofac;
using Autofac.Core;
using MvvmCross.Platform.Core;
using MvvmCross.Platform.IoC;
using System;
using System.Linq;
public class AutofacMvxIocProvider : MvxSingleton<IMvxIoCProvider>, IMvxIoCProvider
{
private readonly IContainer _container;
@jburditt
jburditt / Project.proj
Last active February 4, 2023 00:04
Visual Studio Clean bin and obj Folders
<!-- Visual Studio 2022 -->
<!-- Put this in every csproj file -->
<Import Project="..\..\Tools\Cleanup.targets"/>
<!-- Tools\Cleanup.targets -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="DeleteBinAndObjFolders" AfterTargets="Clean"> <!-- common vars https://msdn.microsoft.com/en-us/library/c02as0cs.aspx?f=255&MSPPError=-2147217396 -->
<RemoveDir Directories="$(BaseOutputPath)" /> <!-- bin -->
<RemoveDir Directories="$(ProjectDir)$(BaseIntermediateOutputPath)" /> <!-- obj -->
</Target>
@jburditt
jburditt / aws-windows-deployment-manifest.json
Last active March 14, 2018 22:59
.NET Core to Pipelines Build
{
"manifestVersion": 1,
"deployments": {
"aspNetCoreWeb": [
{
"name": "app",
"parameters": {
"appBundle": ".",
"iisPath": "/",