Skip to content

Instantly share code, notes, and snippets.

@norwd
norwd / эспэранто.sed
Last active May 12, 2025 04:51
Програмэто эн сэд пор традуки нормайн литэройн дэ Эспэранто эн ла уникодан прэзэнтон цирилан.
#!/bin/sed -f
#
# Ĉi tiu verko estas markita per "CC0 1.0" (t.e. publika havaĵo).
# https://eo.wikipedia.org/wiki/Krea_Komunaĵo
#
# La skripto tradukas la literojn de la norma Esperanto en la literojn
# de la cirila alfabeto, pli malpli laŭ la tradicia transliterumo:
# https://eo.wikipedia.org/wiki/Transliterumo_de_Esperanto
#
@norwd
norwd / repository-open-graph-template.md
Last active October 17, 2024 21:13
This is a modified template for GitHub repository images, pre-filled with a grid

Pre-Filled Repository Image Template

repository-open-graph-template

repository-open-graph-template-v2

@norwd
norwd / keep-repo-private.yml
Last active November 27, 2024 03:13
Use GitHub Actions to keep a repo private even if made public manually.
---
on: public
jobs:
make-private:
runs-on: ubuntu-latest
steps:
- run: gh repo edit ${{ github.repository }} --visibility private --accept-visibility-change-consequences
env:
GH_TOKEN: ${{ secrets.KEEP_REPO_PRIVATE }}
@magnusbakken
magnusbakken / CustomXmlCommentsSchemaFilter.cs
Created January 31, 2022 10:38
A custom Swashbuckle schema filter that adds remarks to schema descriptions.
using System.Xml.XPath;
using Microsoft.OpenApi.Models;
namespace Swashbuckle.AspNetCore.SwaggerGen;
// This is a slightly modified version of the built-in XmlCommentsSchemaFilter.
// Currently our only modifications are that we append the contents of the <remarks> section to the description for each schema item.
public class CustomXmlCommentsSchemaFilter : ISchemaFilter
{
@rupeshtiwari
rupeshtiwari / main.yaml
Created March 30, 2021 15:01
cache node_modules in github workflow
name: Caching npm packages
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@arzzen
arzzen / mailmap.sh
Created February 25, 2020 07:36
mailmap.sh
#! /bin/sh
paster() {
while read email; do
[ -z "$email" ] || echo "$1" "$email"
done
}
grouper() {
IFS="<"
@javafun
javafun / target.xml
Created February 4, 2020 04:00 — forked from sliekens/target.xml
A list of all <Target /> tags that ship with MSBuild / Visual Studio
C:\Program Files (x86)\MSBuild\12.0\Bin\Microsoft.Common.CurrentVersion.targets
<Target Name="_CheckForInvalidConfigurationAndPlatform"></Target>
<Target Name="Build" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(BuildDependsOn)" Returns="$(TargetPath)" />
<Target Name="BeforeBuild" />
<Target Name="AfterBuild" />
<Target Name="CoreBuild" DependsOnTargets="$(CoreBuildDependsOn)"></Target>
<Target Name="Rebuild" Condition=" '$(_InvalidConfigurationWarning)' != 'true' " DependsOnTargets="$(RebuildDependsOn)" Returns="$(TargetPath)" />
<Target Name="BeforeRebuild" />
<Target Name="AfterRebuild" />
<Target Name="BuildGenerateSources" DependsOnTargets="BuildGenerateSourcesTraverse;$(BuildGenerateSourcesAction)" />
@mattiasghodsian
mattiasghodsian / readme.md
Created November 6, 2019 16:22
How to install and use youtube-dl

Ever needed a tutorial or just download non copyrighted material from YouTube to watch or listen offline?

YouTube-dl is a command-line tool which is open source and can be used to download videos from YouTube, Facebook, and other popular sites, see the full list here.


NOTE: Keep in mind some media contains copyrighted material.


@dleidert
dleidert / gitattributes.md
Created February 26, 2019 18:50
Exclude source files (e.g. GitHub pages) from the automatic github Zipball / Tarball creation

I usually host a projects GitHub pages (docs/) and build service configration files (e.g. .travis.yml or .appveyor.yml) together with the projects source in the master branch. When creating a release, github creates a zip and a tar archive (the so called zipball and tarball), which can also be created these links:

https://api.github.com/repos/:user/:project/tarball
https://api.github.com/repos/:user/:project/zipball

or for a specific release:

@vpadhariya
vpadhariya / clone site using wget.txt
Created January 23, 2018 07:57
Clone site and remove query string values from the files in linux.
# Clone entire site.
wget --content-disposition --execute robots=off --recursive --no-parent --continue --no-clobber http://example.com
# Remove query string from a static resource.
for i in `find $1 -type f -name "*\?*"`; do mv $i `echo $i | cut -d? -f1`; done