Skip to content

Instantly share code, notes, and snippets.

View dennythecoder's full-sized avatar

Denny dennythecoder

View GitHub Profile
The Fred Factor
Team of Teams, McCrystal
Lincoln on Leadership
Strengths Finder, Tom Rath
Eats, Shoots, and Leaves
The Goal, Eliyahu
Emergenetics, Geil Browning
5 Choices
[
{"Index":"1","Process #":"4.1","Process Name":"Develop Project Charter","Knowledge Area":"Integration","Process Group":"Initiate","ITTO Type":"Input","ITTO":"Business Documents","To Study":"","ITTO Purpose":"","ITTO Notes":""},
{"Index":"2","Process #":"4.1","Process Name":"Develop Project Charter","Knowledge Area":"Integration","Process Group":"Initiate","ITTO Type":"Input","ITTO":"Agreements","To Study":"","ITTO Purpose":"","ITTO Notes":""},
{"Index":"3","Process #":"4.1","Process Name":"Develop Project Charter","Knowledge Area":"Integration","Process Group":"Initiate","ITTO Type":"Input","ITTO":"Enterprise Environmental Factors","To Study":"","ITTO Purpose":"","ITTO Notes":""},
{"Index":"4","Process #":"4.1","Process Name":"Develop Project Charter","Knowledge Area":"Integration","Process Group":"Initiate","ITTO Type":"Input","ITTO":"Organizational Process Assets","To Study":"","ITTO Purpose":"","ITTO Notes":""},
{"Index":"5","Process #":"4.1","Process Name":"Develop Project Charter","Knowledge Area":"Int
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`)
VALUES ('yourname', MD5('mysecretpassword'), 'firstname lastname', '[email protected]', '0');
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');
@dennythecoder
dennythecoder / SharePoint Most Recent ULS.ps1
Created January 6, 2020 05:40
Get the most recent SharePoint ULS
$version = "15"
(ls "C:\program files\common files\microsoft shared\web server extensions\$version\logs\$env:COMPUTERNAME*.log" | sort LastWriteTime -Descending )[0]
function Create-SPPermissionsReport($path , $isRecursive)
{
$web = (Get-SPWeb $path)
$users = (Get-SPUser -web $web -Limit ALL)
$users | ForEach {
[pscustomobject]@{
'Name' = $_.Name
'Email' = $_.Email
'UserLogin' = $_.UserLogin

Run PowerShell as Admin

$machineName = "MachineName"
Enable-PSRemoting -force 
Set-Item -Path WSMan:\localhost\Client\TrustedHosts -Value $machineName
Enter-PSSession -ComputerName $machineName -Credential (Get-Credential)
@dennythecoder
dennythecoder / SP Rest Get Lists.js
Created November 8, 2019 01:59
SP 2010 Get List example
function getList(name, cb){
var serviceUrl = 'http://yoursite/_vti_bin/listdata.svc/';
var xhr = new XMLHttpRequest();
xhr.open('GET', serviceUrl + name);
xhr.setRequestHeader('accept', 'application/json;odata=verbose');
xhr.onreadystatechange = function(){
if(this.readyState === 4){
var obj = JSON.parse(this.response);
cb(obj.d.results);
@dennythecoder
dennythecoder / openSchema.js
Last active January 25, 2019 04:22
Open Schema Values enumerated
/*
Open Schema Values enumerated in JavaScript
https://docs.microsoft.com/en-us/sql/ado/reference/ado-api/schemaenum?view=sql-server-2017
*/
const openSchema = {
adSchemaAsserts: 0,
adSchemaCatalogs: 1,
adSchemaCharacterSets: 2,
adSchemaCheckConstraints: 5,
(function(){
var href = location.href;
if(href.indexOf('logout') !== -1){return ;}
var userAgree = sessionStorage.getItem('user_agree');
if(userAgree !== 'true'){
var msg = 'You are accessing a U.S. Government (USG) Information System (IS) that is provided for USG-authorized use only.\n' +
'By using this IS (which includes any device attached to this IS), you consent to the following conditions:\n'+