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 | |
| # Restart bluetooth on to get HQ devices runs over APTX on pipewire | |
| # Supported devices: IdeaPad 5 Pro 16ACH6 with AX210 | |
| # Solutions: https://bbs.archlinux.org/viewtopic.php?id=17135 | |
| systemctl stop bluetooth | |
| hciconfig hci0 down | |
| rmmod btusb | |
| modprobe btusb | |
| hciconfig hci0 up |
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 | |
| # https://engineering.taboola.com/calculating-git-version/ | |
| # Maybe we would use https://gist.github.com/OleksandrKucherenko/9fb14f81a29b46886ccd63b774c5959f | |
| # Depends on https://semver.org/spec/v2.0.0.html | |
| branch=$(git rev-parse --abbrev-ref HEAD) | |
| latest=$(git tag -l --merged master --sort='-*authordate' | head -n1) | |
| semver_parts=(${latest//./ }) | |
| major=${semver_parts[0]} | |
| minor=${semver_parts[1]} |
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/sh | |
| WikiID=$(test -z $1 && echo "Q2090" || echo $1) | |
| curl -X GET "https://www.wikidata.org/w/api.php?action=wbgetentities&ids=${WikiID}&format=json" | jq ".entities[].labels | map( {(.language): .value} )" |
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 | |
| sudo add-apt-repository ppa:linvinus/rhvoice | |
| sudo apt-get update | |
| sudo apt-get install rhvoice rhvoice-russian rhvoice-english aplay | |
| set -x | |
| # Play russian speaker voices | |
| for speeker in aleksandr irina elena anna |
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
| #FROM public.ecr.aws/lambda/dotnet:5.0 | |
| # | |
| #WORKDIR /var/task | |
| # | |
| ## This COPY command copies the .NET Lambda project's build artifacts from the host machine into the image. | |
| ## The source of the COPY should match where the .NET Lambda project publishes its build artifacts. If the Lambda function is being built | |
| ## with the AWS .NET Lambda Tooling, the `--docker-host-build-output-dir` switch controls where the .NET Lambda project | |
| ## will be built. The .NET Lambda project templates default to having `--docker-host-build-output-dir` | |
| ## set in the aws-lambda-tools-defaults.json file to "bin/Release/net5.0/linux-x64/publish". | |
| ## |
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
| package main | |
| import ( | |
| "fmt" | |
| "sort" | |
| ) | |
| type Person struct { | |
| Name string | |
| Age int |
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 | |
| fdupes -rSdNI ./ |
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
| //usr/bin/env test -x $0 && (go build -o "${0}c" "$0" && "${0}c" $@; r=$?; rm -f "${0}c"; exit "$r"); exit "$?" | |
| // | |
| // The top "comment" defines shebang | |
| // More over: | |
| // * https://gist.github.com/posener/73ffd326d88483df6b1cb66e8ed1e0bd | |
| // * https://getstream.io/blog/switched-python-go/ | |
| package main | |
| import ( |
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
| # Officia microsoft .NET SDK image | |
| FROM mcr.microsoft.com/dotnet/core/sdk:latest AS api-build | |
| # Set directory for build | |
| WORKDIR /app | |
| # Copy anything from where docker would be builded | |
| COPY ./. ./ | |
| # Reice packages, Build and shrink as an standalone exutable file |
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/sh | |
| git clone https://github.com/mapbox/mbutil | |
| cd mbutil | |
| ./mb-util --image_format=pbf *.mbtiles tiles | |
| gzip -d -r -S .pbf * | |
| find . -type f -exec mv '{}' '{}'.pbf \; |