Skip to content

Instantly share code, notes, and snippets.

View AlbertoMonteiro's full-sized avatar
😎
Writting every day lines fo happy code

Alberto Monteiro AlbertoMonteiro

😎
Writting every day lines fo happy code
View GitHub Profile
@AlbertoMonteiro
AlbertoMonteiro / DecompileMigrationScript.csx
Last active August 1, 2017 19:54
Decompile migration
#r "System.Xml"
#r "System.Xml.Linq"
#r "System.IO.Compression"
#r "System.Data"
using System.Xml.Linq;
using System.IO.Compression;
using System.Data.SqlClient;
public void DecompressDatabaseMigration(string migrationName, string databaseName)
@AlbertoMonteiro
AlbertoMonteiro / IgnoreCertificate.cs
Last active June 19, 2017 12:09
Ignorar certificado no WebClient (IgnoreCertificate)
ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true;
@AlbertoMonteiro
AlbertoMonteiro / Windows Context Menus.reg
Last active November 8, 2015 16:18
Set of Windows Context Menu helpers
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\vs14cmd]
@="Visual Studio 2015 Command Line"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\vs14cmd\command]
@="cmd.exe /s /k pushd \"%V\" && call \"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\VsDevCmd.bat\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\vs14cmd]
@="Visual Studio 2015 Command Line"
@AlbertoMonteiro
AlbertoMonteiro / 01.md
Last active January 23, 2024 10:11
Migration from Moq to NSubstitute
[user]
name = Alberto Monteiro
email = alberto.monteiro@live.com
[core]
preloadindex = true
fscache = true
autocrlf = true
editor = code -n -w
[alias]
fetchall = fetch --all --prune
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst 1password
cinst 7zip
cinst 7zip.install
cinst AdobeAIR
cinst adobereader
cinst Atom
cinst markdownpad2
@lontivero
lontivero / gist:593fc51f1208555112e0
Last active June 24, 2023 20:05
Generates Markdown from VS XML documentation file
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml;
using System.Xml.Linq;
namespace GithubWikiDoc
{
@AlbertoMonteiro
AlbertoMonteiro / ScrollPositionBehavior.cs
Created February 11, 2012 04:10
Custom WP7 Behaviors
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interactivity;
namespace Custom.Behaviors
{
public class ScrollPositionBehavior : Behavior<ScrollViewer>
{
public double Position
@AbraaoAlves
AbraaoAlves / example.JS
Created November 8, 2011 17:43
Simple example of inheritance, overwrite and override with only native javascript resources. Obs: This example use javascript 1.8.5 especification.
function A(){} /* constructor */
A.prototype = { /* especification of prop and methods of the class A */
num : 5,
name : 'test',
action : function(){ /*base implementation*/},
alert
};
function B(){ /* constructor */
@cmilfont
cmilfont / djs.js
Created March 9, 2011 14:13
djr_controller.rb
Array.prototype.add = function(el) {
this[this.length] = el;
return this;
};
function toMap(object) {
var arr = [];
for(var item in object) arr[arr.length] = {key: item, value: object[item]};
return arr;
};