Skip to content

Instantly share code, notes, and snippets.

View farukterzioglu's full-sized avatar
🎯
Focusing

Faruk Terzioğlu farukterzioglu

🎯
Focusing
View GitHub Profile
0x60606040526040516020806106f5833981016040528080519060200190919050505b80600160005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550806000600050819055505b506106868061006f6000396000f360606040523615610074576000357c010000000000000000000000000000000000000000000000000000000090048063095ea7b31461008157806318160ddd146100b657806323b872dd146100d957806370a0823114610117578063a9059cbb14610143578063dd62ed3e1461017857610074565b61007f5b610002565b565b005b6100a060048080359060200190919080359060200190919050506101ad565b6040518082815260200191505060405180910390f35b6100c36004805050610674565b6040518082815260200191505060405180910390f35b6101016004808035906020019091908035906020019091908035906020019091905050610281565b6040518082815260200191505060405180910390f35b61012d600480803590602001909190505061048d565b6040518082815260200191505060405180910390f35b61016260048080359060200190919080359060200190919050506104cb565b6040518082815260200191505060405180910390f35b6101976004808035906020019091908035906020019091
using Nethereum.Web3;
using Nethereum.Web3.Accounts;
using NUnit.Framework;
namespace Tests
{
public class ArticleTests
{
string _privateKey;
Web3 _web3;
@farukterzioglu
farukterzioglu / notes.txt
Created August 27, 2019 21:36
Raspian Buster Wifi Dongle Problem
https://www.raspberrypi.org/forums/viewtopic.php?t=189889
Re: Raspberry Pi 3 cannot set up WiFi network
Quote
Wed Aug 02, 2017 9:30 am
Mind I can't explain it exactly, you could have the same issue as I had. When I got my pi I used the /etc/network/interfaces file to set my fixed IP address on eth0 (ethernet).
This worked fine with the exception of my wifi never working properly, but as I was using it with a hard wired cable I never added it as a priority to fix it.
@farukterzioglu
farukterzioglu / Program.cs
Created August 26, 2019 20:02
background-service-23.5
services.AddHostedService<ApplicationService>();
services.AddHostedService<AnotherService>();
services.AddHostedService<AnotherService>();
@farukterzioglu
farukterzioglu / Program.cs
Created August 26, 2019 19:30
background-service-19.75
.UseSerilog((hostingContext, loggerConfiguration) =>
{
loggerConfiguration.ReadFrom.Configuration(hostingContext.Configuration);
})
@farukterzioglu
farukterzioglu / Program.cs
Created August 26, 2019 19:19
background-service-19.5
// External settings provider
services.Configure<ExternalSettings>( (options) => {
// TODO: Get values from external settings provider (eg. Consul)
options.SomeValue = 1000;
options.AnotherValue = "a value";
});
@farukterzioglu
farukterzioglu / appsettings.Development.json
Created August 24, 2019 12:17
background-service-10.5
{
"intervalMs": "1000",
"environment": "development",
"authentication": {
"username" : "dev_user",
"password" : "dev_pass"
}
}
@farukterzioglu
farukterzioglu / Program.cs
Created August 22, 2019 21:43
background-service-5.5
.ConfigureServices((hostContext, services) => {
services.Configure<ApplicationSettings>(hostContext.Configuration);
services.Configure<AuthenticationSettings>(hostContext.Configuration.GetSection("authentication"));
services.AddTransient<IRepository, Repository>();
services.AddHostedService<ApplicationService>();
});
@farukterzioglu
farukterzioglu / Program.cs
Created August 20, 2019 21:58
background-service-25
// Program.cs
AuthenticationSettings bindedSettings = new AuthenticationSettings();
hostContext.Configuration.Bind("authentication", bindedSettings);
services.AddSingleton<AuthenticationSettings>(bindedSettings);
// Repository.cs
public class Repository : IRepository
{
private readonly AuthenticationSettings _authenticationSettings;
@farukterzioglu
farukterzioglu / AnotherService.cs
Created August 20, 2019 21:31
background-service-25
public class AnotherService : BackgroundService
{
private bool _isStopping;
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
try
{
while(!stoppingToken.IsCancellationRequested && !_isStopping)
{