Skip to content

Instantly share code, notes, and snippets.

@ubergoober
ubergoober / full_path_finder.sh
Created November 11, 2014 08:40
Show full path in OS X finder title bar
defaults write com.apple.finder _FXShowPosixPathInTitle -bool YES
@ubergoober
ubergoober / .bash_profile.sh
Last active May 6, 2019 16:50
Bash profile (created for mac terminal) which I use. To keep this updated without impacting your additions, edit the file ~/.bash_adds which is added after restarting your terminal or doing a "source ~/.bash_profile"
# advise not editing this file for copy/paste drop in updating (not that I update this gist that often).
# when you source this file (or restart term), a ~/.bash_adds file is created which get's sourced from this file.
# Feel free to edit this file in your ~/.bash_profile file, but don't blame me if you overwrite some cool addtions :)
# -- old -- export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[32m\]\$(parse_git_branch)\[\033[00m\]\$ "
export PS1="\n\[\033[48;5;235m\]\[\033[36m\]\u\[\033[m\]\[\033[48;5;235m\]@\[\033[32m\]\h\[\033[38;5;245m\] | \[\033[38;5;99m\]Node: \$(parse_node_version)\[\033[38;5;245m\] | \[\033[38;5;204m\]\$(parse_date_time)\[\033[00m\]\n\[\033[33;1m\]\w\[\033[32m\]\$(parse_git_branch)\[\033[00m\]$ "
export CLICOLOR=1
export LSCOLORS=DxFxBxDxCxegedabagacad
@ubergoober
ubergoober / ADAccountTypes.bat
Created May 7, 2014 18:28
AD Account Types
@echo off
if {%2}=={} @echo Syntax: call sAMAccountType sat satDescription&goto :EOF
if "%1" EQU "0" set %2=SAM_DOMAIN_OBJECT&goto :EOF
setlocal
set /a sat=%1
set desc=UNKNOWN
if %sat% EQU 268435456 set desc=SAM_GROUP_OBJECT&goto finish
if %sat% EQU 268435457 set desc=SAM_NON_SECURITY_GROUP_OBJECT&goto finish
if %sat% EQU 536870912 set desc=SAM_ALIAS_OBJECT&goto finish
if %sat% EQU 536870913 set desc=SAM_NON_SECURITY_ALIAS_OBJECT&goto finish
@ubergoober
ubergoober / SCCMLastStateValues.txt
Created May 7, 2014 18:27
SCCM Last State values in v_ClientAdvertisementStatus
SCCM Last State values in v_ClientAdvertisementStatus in the Database
-1 - Accepted - No Further Status
0 - No Status
1 - Accepted
8 - Waiting
9 - Running
11 - Failed
13 - Succeeded
"Accepted - No Further Status" means that the client(s) received the advertisment but not yet started the installation. The clients may have to start the installation manually or in the case of an App-V app, will need to be executed manually. (this comment was added by me (Paul) based on information found online.
@ubergoober
ubergoober / jQueryToASP.js
Created May 7, 2014 18:26
jQuery Ajax call to ASP.NET Services simple example
function My_jQuery_AjaxCall_To_ASPServices_Example() {
$.ajax({
url: 'HTTP://WEBPAGE.URL/AJAXSERVICE',
dataType: 'json',
data: JSON.stringify({PARAM1: "STRINGVALUE", PARAM2: INTVALUE}),
type: 'post',
contentType: "application/json; charset=utf-8",
success: function (data) {
$('#DIVWITHIDNAMETOUPDATE').html(data.d);
@ubergoober
ubergoober / RDPSettings.txt
Last active August 29, 2015 14:01
Complete RDP file settings
Alternate Shell:s:<string>
AudioMode:i:<int>
Authentication Level:i:<int>
AutoReconnect Max Retries:i:<int>
AutoReconnection Enabled:i:<0 or 1>
BitmapCacheSize:i:<int>
BitmapPersistCache16Size:i:<int>
BitmapPersistCache24Size:i:<int>
BitmapPersistCache32Size:i:<int>
BitmapPersistCacheSize:i:<int>
@ubergoober
ubergoober / GoogleSuggestURL
Created May 7, 2014 18:21
Google Suggest auto complete URL
http://google.com/complete/search?output=toolbar&q=[query+words]
@ubergoober
ubergoober / ClearWindowsAuthentication.js
Created May 7, 2014 17:48
Clear Windows Authentication in IE javascript
// This is an attempt at clearing Windows Authentication in IE when setup in IIS as the authentication method.
// This is no way a solution. Only a hack that semi worked.
javascript:try {document.execCommand("ClearAuthenticationCache");}
catch (e) { }
location.href('/');
@ubergoober
ubergoober / DisableScriptDebuggingVS
Created May 7, 2014 17:46
Disable all script debugging in Visual Studio and IE8
ref: http://blogs.msdn.com/b/greggm/archive/2009/04/06/disabling-script-debugging-in-vs-2008-ie8.aspx
Disable all script debugging in Visual Studio and IE8:
Open a new command prompt (start->run, cmd.exe). If you are on a 64-bit computer this needs to be a 32-bit prompt (start->run, c:\windows\syswow64\cmd.exe)
reg add HKLM\SOFTWARE\Microsoft\VisualStudio\9.0\AD7Metrics\Engine\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {4FF9DEF4-8922-4D02-9379-3FFA64D1D639} /f
If you are using Visual Web Developer Express, replace 'VisualStudio' with 'VWDExpress':
reg add HKLM\SOFTWARE\Microsoft\VWDExpress\9.0\AD7Metrics\Engine\{F200A7E7-DEA5-11D0-B854-00A0244A1DE2} /v ProgramProvider /d {4FF9DEF4-8922-4D02-9379-3FFA64D1D639} /f
If you want to restore your computer so that you can debug scripts again:
@ubergoober
ubergoober / WMISchedules.ini
Created May 7, 2014 17:45
WMI Schedule IDs
SCHEDULE_ID_HARDWARE_INVENTORY = "{00000000-0000-0000-0000-000000000001}";
SCHEDULE_ID_SOFTWARE_INVENTORY = "{00000000-0000-0000-0000-000000000002}";
SCHEDULE_ID_DATA_DISCOVERY_RECORD = "{00000000-0000-0000-0000-000000000003}";
SCHEDULE_ID_FILE_COLLECTION = "{00000000-0000-0000-0000-000000000010}";
SCHEDULE_ID_MACHINE_POLICY_ASSIGNMENTS_REQUEST = "{00000000-0000-0000-0000-000000000021}";
SCHEDULE_ID_MACHINE_POLICY_EVALUATION = "{00000000-0000-0000-0000-000000000022}";
SCHEDULE_ID_REFRESH_DEFAULT_MANAGEMENT_POINT = "{00000000-0000-0000-0000-000000000023}";
SCHEDULE_ID_REFRESH_LOCATION_AD_SITE_OR_SUBNET = "{00000000-0000-0000-0000-000000000024}";
SCHEDULE_ID_REQUEST_TIMEOUT_VALUE_FOR_TASKS = "{00000000-0000-0000-0000-000000000025}";
SCHEDULE_ID_REQUEST_USER_ASSIGNMENTS = "{00000000-0000-0000-0000-000000000026}";