Skip to content

Instantly share code, notes, and snippets.

Bob Junior robertosljunior

  • Brazil
Block or report user

Report or block robertosljunior

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@robertosljunior
robertosljunior / format_cpf.dax
Created Nov 26, 2018
Formatação de CPF usando DAX
View format_cpf.dax
var CPF =
FORMAT (
SELECTEDVALUE ( DM_MGR_CLIENTE[NUM_CPF] );
"000\.##0\.##0\-#0"
)
@robertosljunior
robertosljunior / ESTADOS_UF_BRASIL_ARRAY.md
Last active Feb 28, 2018
Estados brasileiros - TAG HTML SELECT, ARRAY
View ESTADOS_UF_BRASIL_ARRAY.md

UF's abreviadas

CSHARP

var UFs = "AC AL AP AM BA CE DF ES GO MA MT MS MG PR PB PA PE PI RJ RN RS RO RR SC SE SP TO".Split(' ');

JAVASCRIPT

var UFs = "AC AL AP AM BA CE DF ES GO MA MT MS MG PR PB PA PE PI RJ RN RS RO RR SC SE SP TO".split(' ');
View smallestdomreadyever.js
function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()}
@robertosljunior
robertosljunior / cb_addEventListener.js
Created May 29, 2017 — forked from eduardocereto/cb_addEventListener.js
a cross-browser implementation of addEventListener/AttachEvent without external dependencies
View cb_addEventListener.js
/**
* Cross Browser helper to addEventListener.
*
* @param {HTMLElement} obj The Element to attach event to.
* @param {string} evt The event that will trigger the binded function.
* @param {function(event)} fnc The function to bind to the element.
* @return {boolean} true if it was successfuly binded.
*/
var cb_addEventListener = function(obj, evt, fnc) {
// W3C model
View iemagic.js
// http://stackoverflow.com/a/5913807
if(/msie/i.test(navigator.userAgent) && !/opera/i.test(navigator.userAgent)) {
var IEBinaryToArray_ByteStr_Script =
"<!-- IEBinaryToArray_ByteStr -->\r\n"+
"<script type='text/vbscript'>\r\n"+
"Function IEBinaryToArray_ByteStr(Binary)\r\n"+
" IEBinaryToArray_ByteStr = CStr(Binary)\r\n"+
"End Function\r\n"+
"Function IEBinaryToArray_ByteStr_Last(Binary)\r\n"+
View MakeURLSafe.cs
private static char Hex(int ix)
{
if (ix < 10)
{
return (char)(ix + 48);
}
return (char)(ix - 10 + 65);
}
View empty
emptyImage:"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="
View jqueryLoader.js
(function (d) {
if (typeof jQuery != 'undefined') {
s = d.createElement('script');
s.src = 'https://code.jquery.com/jquery-1.12.4.min.js';
s.type = 'type/javascript';
d.getElementsByTagName('head')[0].appendChild(s);
alert(jQuery.fn.jquery);
}
})(document);
@robertosljunior
robertosljunior / bat
Created Jun 1, 2016
Download nuget (powershell)
View bat
powershell "(new-object net.webclient).DownloadFile('https://nuget.org/nuget.exe', 'nuget.exe')"
@robertosljunior
robertosljunior / tspowershell.ps1
Created May 10, 2016
Configuring Terminal services using powershell
View tspowershell.ps1
set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-name "fDenyTSConnections" -Value 0
You can’t perform that action at this time.