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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All | |
Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All |
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
inAppBrowser | |
http://ngcordova.com/docs/plugins/inAppBrowser/ | |
Force download our open file Pdf: | |
var options = { | |
location: 'yes', | |
clearcache: 'yes' | |
}; |
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
openssl x509 -inform DER -outform PEM -in ios_development.cer -out ios_development.cer.pem | |
openssl pkcs12 -export -inkey keyname.key -in ios_development.cer.pem -out Certificates.p12 |
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
public interface IFoo {} | |
public abstract class MyClass<T> | |
where T : class, IFoo | |
{ | |
} | |
class Base { } | |
class Test<T, U> | |
where U : struct |
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
// Get all users | |
var url = "http://localhost:8080/api/v1/users"; | |
var xhr = new XMLHttpRequest() | |
xhr.open('GET', url, true) | |
xhr.onload = function () { | |
var users = JSON.parse(xhr.responseText); | |
if (xhr.readyState == 4 && xhr.status == "200") { | |
console.table(users); | |
} else { | |
console.error(users); |
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
#region Hide System.Object inherited methods | |
/// <summary> | |
/// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>. | |
/// </summary> | |
/// <returns> | |
/// true if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>; otherwise, false. | |
/// </returns> | |
/// <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:System.Object"/>. </param><filterpriority>2</filterpriority> | |
[EditorBrowsable(EditorBrowsableState.Never)] |
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 request = new XMLHttpRequest(); | |
request.open('GET', '/bar/foo.txt', false); // `false` makes the request synchronous | |
request.send(null); | |
if (request.status === 200) { | |
console.log(request.responseText); | |
} |
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
public static IList<TRes> ListAs<TRes>(this IQueryOver qry, TRes resultByExample) | |
{ | |
var ctor = typeof (TRes).GetConstructors().First(); | |
return qry.UnderlyingCriteria | |
.SetResultTransformer(Transformers.AliasToBeanConstructor(ctor)) | |
.List<TRes>(); | |
} | |
[Fact] | |
public void ListAs_Should_CastQueryOverResultToTypeSameAsSupliedExampleInstance() |
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
param([string]$installationType = "NONE") | |
Set-Content -Path "modules.txt" -Value "" -Force; | |
Get-Content "a1f.webapi.$($installationType.ToLower()).sln" | | |
Select-String 'Project\(' | | |
ForEach-Object { | |
$projectParts = $_ -Split '[,=]' | ForEach-Object { $_.Trim('[ "{}]') }; | |
If($projectParts[1].startswith("a1f.")) { | |
Add-Content -Path "modules.txt" -Value $projectParts[1] -Force; |
OlderNewer