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
#!/bin/bash | |
LANG=en_US.UTF-8 | |
dir="/media/myuser/gitrepos" | |
cd "$dir" | |
# ------------------------------------------- | |
console_log () { |
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.Threading; | |
namespace MT.Tests | |
{ | |
/// <summary> | |
/// An object containing some information. | |
/// </summary> | |
public class Logic | |
{ |
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.Net.Http; | |
using System.Net.Http.Headers; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc.Testing; | |
using Microsoft.EntityFrameworkCore; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.DependencyInjection.Extensions; | |
using Tweetbook.Contracts.V1; | |
using Tweetbook.Contracts.V1.Requests; | |
using Tweetbook.Contracts.V1.Responses; |
- Get VS Code
- Remove using NUnit.Framework;
- Add using XUnit;
- Replace all [Test] with [Fact]
- Replace [SetUp] with a constructor
- Replace Assert.That(actualValue, Is.EqualTo(value)); with Assert.Equal(expected, actual)
- highlight Is.EqualTo(
- Delete it
- Select to the end of the line
- Ctrl + X
Create a script called Terminal (yes, without a extension) inside the folder ~/.local/share/nautilus/scripts with the following content:
Create File: /home/m/.local/share/nautilus/scripts/Termial
#!/bin/sh
gnome-terminal
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
# PS C:\WINDOWS\system32> choco list -l -r --id-only | ForEach-Object {echo "choco install -y $PSItem"} | |
choco install -y 7zip | |
choco install -y 7zip.install | |
choco install -y adobereader | |
choco install -y airtame | |
choco install -y autohotkey | |
choco install -y autohotkey.install | |
choco install -y autohotkey.portable | |
choco install -y autoit | |
choco install -y autoit.install |
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
#!/bin/bash | |
echo "LC_ALL=en_US.UTF-8" | sudo tee -a /etc/environment | |
echo "en_US.UTF-8 UTF-8" | sudo tee -a /etc/locale.gen | |
echo "LANG=en_US.UTF-8" | sudo tee -a /etc/locale.conf | |
sudo locale-gen en_US.UTF-8 |
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
# I want to sync the local clock but don't have access to any NTP server. | |
# Websites such as https://time.is give me the correct time and I can manually adjust the local clock. | |
# But then I recall that a HTTP response often contains a date header with current time in GMT timezone. | |
# I'll use it to set the system clock with the precision of 1 or 2 seconds. | |
# in Linux | |
sudo date -us "$(curl -Is google.com | grep '^Date:' | cut -d' ' -f3-)" | |
# in Linux with fish shell |
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
[Desktop Entry] | |
Name=Bash.sh | |
Comment=New custom entry: | |
Type=Link | |
URL=.source/bash.sh | |
Icon=application-vnd.oasis.opendocument.text |