Skip to content

Instantly share code, notes, and snippets.

# Check your existing configuration
gcloud config configurations list

# Activete or Create an empty one
gcloud config configurations activate $CONFIG_NAME
gcloud config configurations create $CONFIG_NAME

# Set the project 
gcloud config set project $PROJECT
[
{
"name": "Solana",
"ring": "2-4 years",
"quadrant": "infrastructure",
"isNew": "TRUE",
"description": "More cost effective than Ethereum for running dApps ..."
},
{
"name": "Combient Twin",
@torstenek
torstenek / com.torstenek.brew.upgrade.plist
Created October 31, 2020 10:50
scheduled brew upgrade macos
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.torstenek.brew.upgrade</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/brew</string>
<string>upgrade</string>
@torstenek
torstenek / com.torstenek.brew.update.plist
Created October 31, 2020 10:48
scheduled brew update macos
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.torstenek.brew.update</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/brew</string>
<string>update</string>
@torstenek
torstenek / planned-duration-float.json
Last active August 17, 2020 09:31
Sample xAPI json featuring the planned-duration-float context extension
{
"version": "1.0.0",
"id": "f91a40ad-5034-5ce2-be8d-ea0a30374640",
"actor": {
"objectType": "Agent",
"mbox": "mailto:vadim.simonov@seb.se"
},
"verb": {
"id": "http://adlnet.gov/expapi/verbs/progressed"
},
/*
Install this script as a pre-request Script on your Postman collection.
Define Auth_Url, and Basic_Auth as local variables on the collection.
Define OAuth_Token, OAuth_Timestamp, ExpiresInTime, OAUTH_USERNAME, OAUTH_PASSWORD and OAUTH_REFRESH_TOKEN
in the associated Postman environment.
*/
var tokenDate = new Date(2010, 1, 1);
var tokenTimestamp = pm.environment.get("OAuth_Timestamp");
if (tokenTimestamp) {
tokenDate = Date.parse(tokenTimestamp);
Future<String> fetchUserOrder() =>
// Imagine that this function is
// more complex and slow.
Future.delayed(
Duration(seconds: 2),
() => 'Large Latte',
);
void main() async {

Keybase proof

I hereby claim:

  • I am torstenek on github.
  • I am torstenek (https://keybase.io/torstenek) on keybase.
  • I have a public key ASBvmb4BgUFLzw423YbpIfDVuRx6xfoCjCiLW5nuxun-1Qo

To claim this, I am signing this object:

@torstenek
torstenek / gist:a0d497a233f31c937dcd
Created May 20, 2015 16:37
onename verification
Verifying I am +torstenek on my passcard. https://onename.com/torstenek
@torstenek
torstenek / README.markdown
Created August 4, 2012 10:59 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string