Skip to content

Instantly share code, notes, and snippets.

View odeke-em's full-sized avatar

Emmanuel T Odeke odeke-em

View GitHub Profile
@indragiek
indragiek / ios_sim_arm64.patch
Last active April 21, 2023 03:28
Bazel 3.7.1 patch to build an arm64 slice targeting the iOS Simulator. Use it by running `bazel build ... --cpu=ios_sim_arm64 --apple_platform_type=ios`
diff --git a/src/main/java/com/google/devtools/build/lib/rules/apple/ApplePlatform.java b/src/main/java/com/google/devtools/build/lib/rules/apple/ApplePlatform.java
index 7759984b03..6f41eca83b 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/apple/ApplePlatform.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/apple/ApplePlatform.java
@@ -42,7 +42,7 @@ public enum ApplePlatform implements ApplePlatformApi {
CATALYST("catalyst", "MacOSX", PlatformType.CATALYST, true);
private static final ImmutableSet<String> IOS_SIMULATOR_TARGET_CPUS =
- ImmutableSet.of("ios_x86_64", "ios_i386");
+ ImmutableSet.of("ios_x86_64", "ios_i386", "ios_sim_arm64");
@MichaelTJones
MichaelTJones / Go_Survey_1_13.md
Last active June 29, 2019 14:39
Go Language Survey
@alexismp
alexismp / index.js
Last active November 8, 2022 21:58
Node.js 8 Cloud Function to write to a Google Sheets document
// Copyright 2018 Google LLC.
// SPDX-License-Identifier: Apache-2.0
const { google } = require("googleapis");
const { Storage } = require("@google-cloud/storage");
exports.csv2sheet = async (data, context) => {
var fileName = data.name;
// basic check that this is a *.csv file, etc...
if (!fileName.endsWith(".csv")) {
@laurenfazah
laurenfazah / express_postgress_knex.md
Last active November 26, 2022 13:19
Cheat Sheet: Setting up Express with Postgres via Knex

Express & Postgres via Knex

Note: <example> is meant to denote text replaced by you (including brackets).

Setup

// global dependencies
npm install -g knex
# Make sure you grab the latest version
curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip
# Unzip
unzip protoc-3.3.0-linux-x86_64.zip -d protoc3
# Move protoc to /usr/local/bin/
sudo mv protoc3/bin/* /usr/local/bin/
# Move protoc3/include to /usr/local/include/
package main
import (
"context"
"log"
"golang.org/x/oauth2/google"
compute "google.golang.org/api/compute/v1"
)

Building enduring value from the ICO boom

The ICO boom is precipitating a profound sea change in the availability of resources for blockchain Research and Development. For the 1st time, the sector has a entry level resources for developing a radical new set of tools for the global(solar system?) economy.

Our goal in 10 -15 years is pretty clear- Blockchain based systems should be the most useful and powerful liquidity rails for all kinds of assets. We have a lot of works to do fulfill the nascent potential of the blockchain space.

Here is a non-comprehensive list all the things we need to get to the moon.

Cryptographic Engineering

  • Safe, mature libraries for implementing complex protocols. NACL and libsodium aren’t going to cut it. Bitcoin-Core’s libsecp256k1 and Isis & Henry’s curve25519- Dalek are the way forward
  • Zero knowledge proof libraries need to be substantially matured. Libsnark and the forthcoming STARK work need mature, battle tested domain specific languages and compilers for securely
@maruel
maruel / gist:544cb4266a1c844383c2972900e42ff9
Created August 2, 2017 23:43
Raw and brotli+gzip compressed files
maruel@periph-io /var/lib/docker/web/periph.io/www $ stat -c "%6s %n" $(find ./ -type f -name "*.html*" | sort)
69 ./apps/examples/index.html
55 ./apps/examples/index.html.br
85 ./apps/examples/index.html.gz
78 ./apps/index.html
59 ./apps/index.html.br
92 ./apps/index.html.gz
23291 ./device/apa102/index.html
5622 ./device/apa102/index.html.br
6559 ./device/apa102/index.html.gz
// Copyright 2016 Google Inc. All rights reserved.
// Use of this source code is governed by the Apache 2.0
// license that can be found in the LICENSE file.
// Command caption reads an audio file and outputs the transcript for it.
package main
import (
"fmt"
"io"
@benhoyt
benhoyt / atomic_counter.py
Created August 3, 2016 13:12
An atomic, thread-safe incrementing counter for Python
"""An atomic, thread-safe incrementing counter."""
import threading
class AtomicCounter:
"""An atomic, thread-safe incrementing counter.
>>> counter = AtomicCounter()
>>> counter.increment()