- Fork https://github.com/github/dmca
- Download latest youtube-dl source code from https://yt-dl.org/latest
- Extract
tar -xvf youtube-dl-2020.09.20.tar.gz
- Push code to your fork as the GitHub CEO
tar -xvf youtube-dl-2020.09.20.tar.gz
// dm Klopapier Widget | |
// | |
// Copyright (C) 2020 by marco79 <[email protected]> | |
// | |
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. | |
// | |
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL | |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
/// <summary> | |
/// Extensions class with enumerable extensions targeted at code generation | |
/// </summary> | |
public static class EnumerableExtensions | |
{ | |
/// <summary> | |
/// Yields a single value | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="instance"></param> |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace [YOURNAMESPACEHERE] | |
{ | |
public static class TypeExtensions | |
{ | |
public static bool IsDerivingFrom(this Type type, Type searchType) |
Note: I recommend reading this gist in order because
Examples 1-6
build on each other.
- Example 1: Getting Console Input With
Console.ReadLine
How to get console input.- Example 2: Parsing The Console Input From
String
ToInt32
How to convert the console input into a numeric value.- Example 3: Validating Console Input With
Int32.TryParse
How to validate numeric input to prevent bugs in your code.- [Example 4: Looping Until User Provides Valid Input](https://gist.github.com/ZacharyPatten/798ed612
#!/usr/bin/awk -f | |
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff | |
# My copy here is written in awk instead of C, has no compelling benefit. | |
# Public domain. @thingskatedid | |
# Run as awk -v x=xyz ... or env variables for stuff? | |
# Assumptions: the data is evenly spaced along the x-axis | |
# TODO: moving average |
// To view the default settings, hold "alt" while clicking on the "Settings" button. | |
// For documentation on these settings, see: https://aka.ms/terminal-documentation | |
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{63661ee7-c8c4-434e-8579-f6112c77101f}", | |
"requestedTheme": "dark", | |
"profiles": | |
{ |
/* | |
* John Conway's Game of Life. | |
* | |
* This is written for POSIX, using Curses. Resizing of the terminal is not | |
* supported. | |
* | |
* By convention in this program, x is the horizontal coordinate and y is | |
* vertical. There correspond to the width and height respectively. | |
* The current generation number is illustrated when show_generation is set. | |
* |
class PdfDownloader @Inject constructor( | |
private val context: Context, | |
private val yourApi: YourApi | |
) { | |
private class DownloadException(message: String, cause: Throwable? = null) : RuntimeException(message, cause) | |
suspend fun download(url: String, fileName: String): String = withContext(Dispatchers.IO) { | |
val file = createFile(fileName) |