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
$web = get-spweb $url | |
$list = $web.Lists["Documents"] | |
# get ready for some sneaky backdoor business | |
$flags=[Reflection.BindingFlags] "NonPublic,Instance" | |
$arr =[Microsoft.SharePoint.SPList].GetField("m_arrListProps", $flags).GetValue($list) | |
$i =[Microsoft.SharePoint.SPList].GetField("m_iRow", $flags).GetValue($list) | |
# make sure we're going to set some new value | |
$newMask = $null |
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
(function() { | |
if (typeof window.setLimitedTimeout === 'undefined' && typeof window.clearLimitedTimeout === 'undefined') { | |
var timers={},_id=0; | |
window.setLimitedTimeout = function(test, reps, interval, cb) { | |
var attempt = 0; | |
var intFunc = typeof interval === 'function' | |
? interval | |
: function(attempt) { return interval; }; | |
var id = _id++; | |
timers[id] = setTimeout(function doit() { |
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
using System; | |
using System.ComponentModel; | |
public static class Conversion { | |
public static T TryAs<T>(this string x, T otherwise = default(T)) | |
{ | |
var converter = TypeDescriptor.GetConverter(typeof(T)); | |
if (converter != null && x != null && converter.CanConvertFrom(x.GetType())) | |
{ | |
try { return (T)converter.ConvertFrom(x); } |
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://forums.whirlpool.net.au/forum-replies.cfm?t=65599&p=-2 | |
var results={}; [].slice.call(document.querySelectorAll('.replytext.bodytext p')).forEach(function(v) { | |
var text = [].slice.call(v.childNodes).map(function(c) { | |
return ( | |
c.textContent.length === 0 || ( | |
c.classList && | |
c.classList.contains("wcrep1") | |
)) ? "\n" : c.textContent; | |
}).join(""); | |
var host = (text.match(/Name\s*:\s*(\w[\w ]+)/)|| [,''])[1] |
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
(function() { | |
var map = { | |
'html': 'markup', | |
'xml': 'markup' | |
}; | |
var lang = /\bbrush:\s*(\w+)\b;?/i; | |
var convert = function(element) { | |
var language = (element.className.match(lang) || [,''])[1]; | |
language = map[language] || language; | |
if ( language && self.Prism.languages[language] ) { |
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
(function(){ | |
var $=function(selector){ | |
return [].slice.call(document.querySelectorAll(selector)); | |
}; | |
$("style,link[rel='stylesheet'],img,video,object").forEach(function(v) { | |
v.remove(); | |
}) | |
$("[style]").forEach(function(v) { | |
v.removeAttribute("style") | |
}); |
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
javascript:(function(){ | |
var id = "df-showtables"; | |
var style=document.getElementById(id); | |
if (style) { | |
style.remove(); | |
} | |
else { | |
style = document.createElement("style"); | |
style.id=id; | |
style.textContent = "table { border: 2px solid #BD1DEA; table-collapse: collapse; } td { border: 1px solid #BADA55; }"; |
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
var gen = function(str) { | |
var g_datetime = function(flags) { | |
var date = new Date(); | |
if (flags["<"] ^ flags[">"]) { | |
var dayTicks = 86400000, | |
midnight=new Date(date.getTime() - ( ( date.getTime() - ( date.getTimezoneOffset() * 60000 ) ) % dayTicks )), | |
mins=~~(date.getTime() - midnight.getTime()), | |
tOffset=g_number.apply(null, flags.t ? flags["<"] ? [0,mins] : [mins,dayTicks] : [0,dayTicks]), | |
dOffset=g_number(1,365)*dayTicks*(flags["<"]?-1:1); | |
date = new Date(midnight.getTime() + (flags.t && !flags.d ? 0 : dOffset) + tOffset); |
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
javascript:(function(t){t("https://api.github.com/gists/a216f6a5e5e74eec0fde","script.js","customthemes")}(function(t){return function(n,e,c){if(!t.getElementById(c)){var i=function(n){var e=t.createElement("script");n&&n(e),t.head.appendChild(e)},o=c+Math.floor(Date.now()/864e5);window[o]=function(t){i(function(n){n.id=c,n.innerHTML=t.data.files[e].content})},i(function(t){t.src=n+"?callback="+o})}}}(document))); |
OlderNewer