Skip to content

Instantly share code, notes, and snippets.


Faruk Terzioğlu farukterzioglu

View GitHub Profile
farukterzioglu /
Created Feb 4, 2021 — forked from myusuf3/
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
View unittest.cs
<PackageReference Include="Nethereum.Web3" Version="3.8.0" />
<PackageReference Include="Nethereum.ABI" Version="3.8.0" />
<PackageReference Include="nunit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="NBitcoin.Secp256k1" Version="1.0.1" />
<PackageReference Include="NBitcoin" Version="5.0.27" />
<PackageReference Include="RestSharp" Version="106.10.1" />
<PackageReference Include="Moq" Version="4.14.6" />
View Response.txt
ScriptError [ScriptError]:EvalFalse
ScriptVerify : [ScriptVerify]:StrictEnc | MinimalData | DiscourageUpgradableNops | CleanStack | Consensus | DiscourageUpgradableWitnessProgram | MinimalIf | NullFail
View bitcoin.cs
var inputList = new List<UnspentCoin>();
var unspentResponse = await client.ListUnspentAsync();
var unspentList = unspentResponse.OrderByDescending( x => x.Amount).ToList();
var inputBtcSum = new Money(0, MoneyUnit.BTC);
foreach (var unspent in unspentList) {
if( inputBtcSum >= totalPaymentAmountBtc) break;
inputBtcSum += unspent.Amount;
View bitcoin.cs
Dictionary<string, int> salaries = GetSalaryList();
Dictionary<string, int> GetSalaryList()
return new Dictionary<string, int>(){
{ "2N2LGTF2XWA5png8mT2fbHRzY9P4XDLWvGc", 2500},
{ "2N94h5bWDAFNsd7SB1f3cQ6RUMmoMaA44tQ", 4500},
{ "2MsjZP4DJmZeV1fRpAw8NcJWiibYopWL7fg", 2250},
{ "2N1cHqXYLas7bnLoCtMppD1yKtrXjRSmB5M", 10000},
{ "2NA9di1yBdHiwgJJVB27nPxpAc8YDpmdSS1", 12500}
View bitcoin.cs
var network = Network.RegTest;
var client = new RPCClient(
credentials: new NetworkCredential(
userName: "myuser",
password: "SomeDecentp4ssw0rd"),
address: new Uri(""),
network: network);
View extendedworker.csproj
<Project Sdk="Microsoft.NET.Sdk">
<Title>Worker Service (Extended)</Title>
<Authors>Faruk Terzioğlu</Authors>
<Description>Pretty much full project template for creating a worker service.</Description>
View template.json
"author": "Faruk Terzioglu",
"name": "Worker Service (Extended)",
"description": "Pretty much full project template for creating a worker service.",
"groupIdentity": "Microsoft.Worker.Extended",
"identity": "Microsoft.Worker.Extended.CSharp.3.1",
"shortName": "workerextended",
"sourceName": "Company.Application1",
"primaryOutputs": [
View nodeos_full_node_setup.txt
apt-get update && apt-get install -y aptitude git lxc-utils zfsutils-linux netfilter-persistent sysstat
# find the partition ID that is linked to the storage serial number.
# This will prevent from losing the partition if disk mapping changes
ls -l /dev/disk/by-id/ | grep sda6
zpool create -f zdata /dev/disk/by-id/wwn-0x600507604092b628236df4851535cef5-part6
## Fixate internal IP address of the container
systemctl stop lxc-net
sed -i -e 's,^.*LXC_DHCP_CONFILE,LXC_DHCP_CONFILE,' /etc/default/lxc-net
View GenerateAddresses.cs
public async Task GenerateAddresses()
var wallet = new Wallet("carry fix final shield cruel learn pave during habit adapt alter habit", "");
string[] addressList = new string[5];
for (int i = 0; i < 5; i++)
var account = wallet.GetAccount(i);
addressList[i] = account.Address;