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
# AdAway Firebase blocklist based on | |
# https://firebase.google.com/docs/cloud-messaging/concept-options#messaging-ports-and-your-firewall | |
# For development and testing purposes. Not recommended for actual use. | |
127.0.0.1 mtalk.google.com | |
127.0.0.1 mtalk4.google.com | |
127.0.0.1 mtalk-staging.google.com | |
127.0.0.1 mtalk-dev.google.com | |
127.0.0.1 alt1-mtalk.google.com | |
127.0.0.1 alt2-mtalk.google.com |
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
using Avalonia; | |
using Avalonia.Controls; | |
using Avalonia.Media; | |
using Avalonia.Media.Immutable; | |
namespace Vinodyss | |
{ | |
public class AutoScalePanel : Panel | |
{ | |
#region Methods |
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
import * as app from '.'; | |
import * as api from '@nestjs/common'; | |
@api.Controller() | |
export class TestController { | |
@api.Get() | |
@app.ResponseValidator(app.TestDto) | |
get() { | |
return new app.TestDto(); | |
} |
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
import * as mobx from 'mobx'; | |
export function deepObserve(onChange: () => void, value: any) { | |
if (value && typeof value === 'object') { | |
mobx.observe(value, (change: any) => { | |
onChange(); | |
if (change.added) { | |
change.added.forEach(deepObserve.bind(null, onChange)); | |
} else if (change.newValue) { | |
deepObserve(onChange, change.newValue); |
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 class HomeController : DataController | |
{ | |
#region Actions | |
[HttpGet] | |
public ActionResult Index() | |
{ | |
return View(Context.Accounts // Using context. | |
.With(x => x.Identities) // Using includes. | |
.Where(x => x.AccountType >= AccountType.Administrator)); // Using filters. |
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 abstract class ContextDecorator : IContext | |
{ | |
private readonly IContext _context; | |
#region Constructor | |
protected ContextDecorator(IContext context) | |
{ | |
_context = context; | |
} |
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 class Context : IContext | |
{ | |
private readonly Entities _entities; // EF6+ DbContext | |
#region Constructor | |
static Context() | |
{ | |
var ensureReference = SqlProviderServices.Instance; | |
} |
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
/** | |
* Extracts the property name from a property expression function. | |
* @param fn The function. | |
* @return The property name. | |
*/ | |
function nameof(fn: Function): string { | |
var body = fn ? fn.toString() : null; | |
var lambdaExpression = body ? body.match(/(?:=>|return)\s*(.+?)\s*(?:;|}|$)/) : null; | |
var propertyExpression = lambdaExpression ? lambdaExpression[1].match(/\.\s*(.+?)\s*$/) : null; | |
if (propertyExpression != null) { |
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
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Runtime.CompilerServices; | |
namespace Rs.Os | |
{ | |
internal abstract class Bindable : IBindable | |
{ | |
#region Abstract |
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
using System; | |
using System.IO; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Threading.Tasks; | |
namespace Test { | |
internal class Program { | |
public static void Main() { | |
var client = Task.Run(() => Client()); |
NewerOlder