🏳️⚧️
This file contains hidden or 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
// ==UserScript== | |
// @name YouTube Transcript Extractor | |
// @namespace http://tampermonkey.net/ | |
// @version 1.9 | |
// @description Extracts YouTube transcripts to the clipboard | |
// @author Programazing | |
// @match https://www.youtube.com/watch?v=* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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 | |
# Get the current Do Not Disturb status | |
current_status=$(gsettings get org.gnome.desktop.notifications show-banners) | |
# Toggle the status | |
if [ "$current_status" = "true" ]; then | |
gsettings set org.gnome.desktop.notifications show-banners false | |
echo "Do Not Disturb mode activated" | |
else |
This file contains hidden or 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
alias generateFlatpakScript="~/generate_flatpak_install_script.sh" |
This file contains hidden or 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
# Navigation | |
alias a='nano ~/.bash_aliases' | |
alias ae='gedit ~/.bash_aliases' | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias todev='cd /media/programazing/Documents/Dev' | |
alias toproj='cd /media/programazing/Documents/Dev/personal/projects' | |
# cloneproj linkToGitRepo |
This file contains hidden or 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
// IEnumerable<char> Lowercase | |
var alphabet = Enumerable.Range('a', 26).Select(n => (char)n); | |
// IEnumerable<char> Uppercase | |
var alphabet = Enumerable.Range('A', 26).Select(n => (char)n); | |
// IEnumerable<string> Lowercase | |
var alphabet = Enumerable.Range('a', 26).Select(n => ((char)n).ToString()); |
This file contains hidden or 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
{"lastUpload":"2019-12-29T17:56:40.049Z","extensionVersion":"v3.4.3"} |
This file contains hidden or 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 DataTable ToDataTable<T>(this List<T> input) | |
{ | |
var props = TypeDescriptor.GetProperties(typeof(T)); | |
var output = new DataTable(); | |
foreach(PropertyDescriptor item in props) | |
{ | |
if (item.PropertyType.IsGenericType && item.PropertyType.GetGenericTypeDefinition() == typeof(Nullable<>)) | |
output.Columns.Add(item.Name, item.PropertyType.GetGenericArguments()[0]); | |
else |
This file contains hidden or 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 Xunit; | |
namespace FizzBuzzChecker.Test | |
{ | |
public class FizzBuzzTests | |
{ | |
[InlineData(3, "Fizz")] | |
[InlineData(6, "Fizz")] | |
[InlineData(9, "Fizz")] | |
[InlineData(12, "Fizz")] |
This file contains hidden or 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 book = (from theBook in _context.Books.Where(b => b.BookId == id) | |
join loan in _context.BookLoans.Where(x => !x.ReturnedOn.HasValue) on theBook.BookId equals loan.BookID into result | |
from loanWithDefault in result.DefaultIfEmpty() | |
select new BookDetailsViewModel | |
{ | |
BookID = theBook.BookId, | |
SubTitle = theBook.SubTitle, | |
Title = theBook.Title, | |
Author = theBook.Author, | |
ISBN = theBook.ISBN, |