This file contains 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
# https://github.com/protocolbuffers/protobuf-javascript/issues/105 | |
# https://github.com/protocolbuffers/protobuf/pull/9874 | |
FROM alpine | |
RUN apk --no-cache add gcompat | |
ARG protoc_js_ver=3.21.2 | |
RUN cd /usr/local &&\ | |
wget -Oprotojs.tar.gz "https://github.com/protocolbuffers/protobuf-javascript/releases/download/v$protoc_js_ver/protobuf-javascript-$protoc_js_ver-linux-$(uname -m).tar.gz" &&\ |
This file contains 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 | |
# | |
# Wrapper script to add command line options to the AVD emulator. | |
# | |
# avdmanager should support the studio.emu.params environment variable, but it doesn't handle commas well. | |
# | |
# ## Installation | |
# | |
# 1. Find your AVD home directory. It should have an `emulator` subdirectory. | |
# 2. Move the `emulator/emulator` file to `emulator/emulator-orig`. |
This file contains 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
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
<application | |
android:label="example" | |
android:name="${applicationName}" | |
android:icon="@mipmap/ic_launcher"> | |
<activity | |
android:name=".MainActivity" | |
android:exported="true" | |
android:launchMode="singleTop" | |
android:theme="@style/LaunchTheme" |
This file contains 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
;; gpasm --mpasm-compatible -p p16f887 repro.asm | |
;; | |
;; Should produce four nop, but produces none, because the m2 i | |
;; binding leaks into the m1 i via the n parameter. | |
;; | |
;; See also https://forum.microchip.com/s/topic/a5C3l000000LzjcEAC/t229040 | |
m1 macro n | |
local i | |
i set 0 |
This file contains 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
// Shader to display a full rainbow and grayscales. | |
// A 2D color picker in a single pane. | |
// | |
// adapted from https://github.com/wsmind/js-pride/blob/master/shaders/rainbow.glsl | |
#define SMOOTH 1 | |
// level is [0,5], assumed to be a whole number | |
vec3 rainbow(float level) | |
{ |
This file contains 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
class Node: | |
def __init__(self, value): | |
self.value = value | |
self.visited = False | |
self.prev = None | |
self.next = None | |
class SieveCache: | |
def __init__(self, capacity): | |
self.capacity = capacity |
This file contains 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
import type { RouteRecordRaw } from "vue-router"; | |
import type { RouterOptions } from '@nuxt/schema'; | |
export default { | |
routes(routes) { | |
if (hasChildren(routes)) { | |
console.warn('The pages had children, which means the fix-pagehierarchy module can be removed!'); | |
return routes; | |
} |
This file contains 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
// A postcss plugin that allows partial-global Vue SFC scoped CSS selectors. | |
// | |
// It introduces the :scoped() pseudo-selector. Use this inside Vue's | |
// :global() to once again make something scoped. This is useful | |
// e.g. if you have an attribute/class on the html element to select | |
// theme or locale. | |
// | |
// ## Status | |
// | |
// This works with (at least) Nuxt 3 on Vue 3.3.4. It has not received much |
This file contains 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
bkadm_metadata_url=https://updates.bottlerocket.aws/2020-07-07 | |
bkadm_targets_url=https://updates.bottlerocket.aws/targets | |
# E.g. get_bottlerocket_url 1.26 x86_64 '1\.13\..*' | |
get_bottlerocket_url() { | |
local kubernetes_ver=$1 arch=$2 ver_regex=$3 | |
shift 3 | |
local variant="metal-k8s-$kubernetes_ver" | |
local metadata_url="$bkadm_metadata_url/$variant/$arch" |
NewerOlder