Skip to content

Instantly share code, notes, and snippets.

View raphaelcarlosr's full-sized avatar
👨‍💻
Focusing

raphaelcarlosr.dev raphaelcarlosr

👨‍💻
Focusing
View GitHub Profile
--select process
select
P.spid
, right(convert(varchar,
dateadd(ms, datediff(ms, P.last_batch, getdate()), '1900-01-01'),
121), 12) as 'batch_duration'
, P.program_name
, P.hostname
, P.loginame
from master.dbo.sysprocesses P
/*
By Osvaldas Valutis, www.osvaldas.info
Available for use under the MIT License
*/
;( function( $, window, document, undefined )
{
var s = document.body || document.documentElement, s = s.style, prefixAnimation = '', prefixTransition = '';
if( s.WebkitAnimation == '' ) prefixAnimation = '-webkit-';
@raphaelcarlosr
raphaelcarlosr / Helper.sql
Last active November 11, 2015 11:48
MS SQL Helper
/**
* Get all database connections
* http://stackoverflow.com/questions/4654291/how-to-get-detailed-list-of-connections-to-database-in-sql-server-2005
*/
DECLARE @AllConnections TABLE(
SPID INT,
Status VARCHAR(MAX),
LOGIN VARCHAR(MAX),
HostName VARCHAR(MAX),
BlkBy VARCHAR(MAX),
@raphaelcarlosr
raphaelcarlosr / awesome-bootstrap-3-sidebar-navigation.markdown
Created May 12, 2017 18:23
Awesome Bootstrap 3 Sidebar Navigation
wmic /namespace:\\root\cimv2 path win32_product where "name like '%%.NET%%'" get version
@raphaelcarlosr
raphaelcarlosr / modal-fullscreen.css
Created March 1, 2018 12:22 — forked from soham2008xyz/modal-fullscreen.css
Bootstrap 3 transparent and fullscreen modals
/* .modal-fullscreen */
.modal-fullscreen {
background: transparent;
}
.modal-fullscreen .modal-content {
background: transparent;
border: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
@raphaelcarlosr
raphaelcarlosr / jQuery.ajaxQueue.min.js
Created August 8, 2018 20:48 — forked from gnarf/jQuery.ajaxQueue.min.js
jQuery.ajaxQueue - A queue for ajax requests
/*
* jQuery.ajaxQueue - A queue for ajax requests
*
* (c) 2011 Corey Frang
* Dual licensed under the MIT and GPL licenses.
*
* Requires jQuery 1.5+
*/
(function(a){var b=a({});a.ajaxQueue=function(c){function g(b){d=a.ajax(c).done(e.resolve).fail(e.reject).then(b,b)}var d,e=a.Deferred(),f=e.promise();b.queue(g),f.abort=function(h){if(d)return d.abort(h);var i=b.queue(),j=a.inArray(g,i);j>-1&&i.splice(j,1),e.rejectWith(c.context||c,[f,h,""]);return f};return f}})(jQuery)
@raphaelcarlosr
raphaelcarlosr / async-task-queue.js
Created August 8, 2018 20:49 — forked from paolorossi/async-task-queue.js
Javascript Queue for sequencing AJAX requests and other asynchronous tasks. Demo http://jsfiddle.net/rusci/26Dud/6/
// Queue class for serializing AJAX calls.
//
// Inspired by Raynos http://stackoverflow.com/a/4797596/1194060
//
// Queue has a public append method that expects some kind of task.
// A task is a generic function passed as callback.
// Constructor expects a handler which is a method that takes a ajax task
// and a callback. Queue expects the handler to deal with the ajax and run
// the callback when it's finished
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade
npm cache clean
npm update -g
SearchRequest request = new SearchRequest("DC=xx,DC=xxx,DC=com",
"(|(objectClass=organizationalUnit)(isDeleted=TRUE)(objectCategory=Person))",
SearchScope.Subtree, attribs);