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
#! /bin/bash | |
sudo apt-get install -y gnome-session-flashback | |
echo "you must restart - on login click the gear and choose gnome flashback (metacity)" |
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
viewedFiles.forEach(viewedFile => { | |
const currentFile = document.querySelectorAll(`div[data-path="${viewedFile.path}"]`)[0] || undefined; | |
if(currentFile) { | |
let currentDiffstat = currentFile.querySelectorAll("span.diffstat")[0].getAttribute('aria-label'); | |
let match = viewedFile.diffstats === currentDiffstat; | |
console.log(`match: ${match} - ${viewedFile.path} - viewedDiffstat: ${viewedFile.diffstats}, currentDiffstat: ${currentDiffstat}`); | |
if(match) { | |
let checkbox = currentFile.querySelectorAll('input[type="checkbox"]')[0]; | |
let viewed = checkbox.checked || false; |
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
select distinct(t.name), s.row_count from sys.tables t | |
join sys.dm_db_partition_stats s | |
on t.object_id = s.object_id | |
where t.is_ms_shipped = 0 | |
order by row_count desc; |
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
SELECT XEvent.query('(event/data/value/deadlock)[1]') AS DeadlockGraph | |
FROM ( | |
SELECT XEvent.query('.') AS XEvent | |
FROM ( | |
SELECT CAST(target_data AS XML) AS TargetData | |
FROM sys.dm_xe_session_targets st | |
INNER JOIN sys.dm_xe_sessions s ON s.address = st.event_session_address | |
WHERE s.NAME = 'system_health' | |
AND st.target_name = 'ring_buffer' | |
) AS Data |
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
SELECT qs.last_logical_reads, st.text, qp.query_plan | |
FROM sys.dm_exec_query_stats qs | |
CROSS APPLY sys.dm_exec_sql_text(qs.sql_handle) st | |
CROSS APPLY sys.dm_exec_query_plan(qs.plan_handle) qp | |
WHERE st.text LIKE '%extent1%' -- Quick and dirty check for a LINQ query | |
AND qp.dbid = DB_ID('AdventureWorks2012_big') |
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
select | |
ps.object_id, | |
idx.name, | |
idx.type_desc, | |
ps.alloc_unit_type_desc, | |
ps.avg_fragmentation_in_percent, | |
ps.fragment_count, | |
ps.avg_fragment_size_in_pages, | |
ps.page_count | |
from |
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 updateTimeLogged() { | |
var time = $("#log_hours").val() + "h " + $("#log_minutes").val() + "m"; | |
$('#log-work-time-logged').val(time); | |
} | |
$(document).on("change", "#log_hours", function(event) { | |
updateTimeLogged(); | |
}); | |
$(document).on("change", "#log_minutes", function(event) { |
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
$('.biz-listing-large').each(function(index, listItem) { | |
var shopName = $(listItem).find('.biz-name').text().trim(); | |
var address = $(listItem).find('address').text().trim().replace(/Auckland/g,", Auckland"); | |
console.log(shopName + "," + address); | |
}); |
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 v = "1.3.2"; | |
if (window.jQuery === undefined || window.jQuery.fn.jquery < v) { | |
var done = false; | |
var script = document.createElement("script"); | |
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/" + v + "/jquery.min.js"; | |
script.onload = script.onreadystatechange = function(){ | |
if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) { | |
done = true; | |
initMyBookmarklet(); | |
} |
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(){$(".table-responsive").find("table tr:contains('Taken')").hide();$(".table-responsive").find("tr").find('td:nth-child(2)').nextAll().hide();$(".table-responsive").find("tr").find('td:nth-child(2)').prevAll().hide();})(); |
NewerOlder