- grab linux source tree from [email protected]:OE4T/linux-tegra-4.9.git
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 | |
# kudos to https://github.com/exp0nge | |
# https://github.com/cli/cli/discussions/5095#discussioncomment-10898590 | |
set -euo pipefail | |
jwt_encode() { | |
# https://stackoverflow.com/questions/58313106/create-rs256-jwt-in-bash | |
PEM=$( cat "$GITHUB_APP_SECRET_PATH" ) |
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 bash | |
set -o pipefail | |
client_id=$1 # Client ID as first argument | |
pem=$( cat $2 ) # file path of the private key as second argument | |
now=$(date +%s) | |
iat=$((${now} - 60)) # Issues 60 seconds in the past |
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 python3.7 | |
import asyncio | |
import iterm2 | |
async def changeTheme(connection,parts): | |
theme_dark = "Tango Dark" | |
theme_light = "Tango Light" | |
print(parts) | |
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
{ | |
"telemetry.enableTelemetry": false, | |
"terminal.integrated.fontFamily": "TerminessTTF Nerd Font, monospace", | |
"editor.renderControlCharacters": true, | |
"files.autoSave": "onFocusChange", | |
"editor.fontFamily": "SpaceMono Nerd Font Mono, Menlo, monospace", | |
"extensions.autoUpdate": false, | |
"debug.console.fontFamily": "TerminessTTF Nerd Font, monospace", | |
"editor.codeLensFontFamily": "TerminessTTF Nerd Font, monospace", | |
"window.zoomLevel": 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
payload.json: | |
{ | |
"resource_id": "/subscription/.../...", | |
"version": "2020-07-21", | |
"type": "Linux", | |
"properties": { | |
"custom_log_files": [ | |
"/var/log/dmesg", | |
"/var/log/messages" |
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 bash | |
REPO_PREFIX="https://download.postgresql.org/pub/repos/yum" | |
REPO_SUFFIX="9.6/redhat/rhel-7-x86_64" | |
wget "$REPO_PREFIX/RPM-GPG-KEY-PGDG-96" | |
sudo rpm --import ./RPM-GPG-KEY-PGDG-96 | |
rm -f ./RPM-GPG-KEY-PGDG-96 | |
echo " |
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
defmodule FunctionHead do | |
def create(attrs) when is_map(attrs) do | |
with {:ok, doc} <- new(attrs), | |
{:ok, _ } <- persist(doc), | |
do: {:ok, doc} | |
end | |
def persist(doc), do: ExAws.Dynamo.put_item(__MODULE__.table_name, doc) | |
def where(filter) when is_map(filter) do | |
with {:ok, response } <- ExAws.Dynamo.get_item(__MODULE__.table_name, filter), |
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
doc = %{id: "Foo"} | |
#wrong | |
defmodule FooBar do | |
def valid_version(doc) do | |
if (is_integer(doc.version)), do: doc, else: doc.version = 1 | |
end | |
end | |
# correct |
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
sudo zypper in -t pattern devel_qt5 | |
sudo zypper in subversion lndir | |
Then, as per: https://github.com/uglide/RedisDesktopManager/wiki/Build-from-source | |
git clone --recursive https://github.com/uglide/RedisDesktopManager.git rdm | |
cd rdm | |
mkdir -p obj-build | |
cd obj-build | |
lndir ../src |