Skip to content

Instantly share code, notes, and snippets.

extension node-module name

2-3 sentences describing the extension (focus on defining the problem it solves).

Usage

Usage instructions, focused for the actual end user, not other maintainers that might use the extension programatically.

  • Stuff like configuration snippets for workspace.json and component.json (if available).
  • How to use the commands/flags it exposes (if any).
@itaymendel
itaymendel / local-compiler
Created May 15, 2019 10:00
tell bit to use the code of a compiler
{
"env": {
"compiler": {
"vue-cli-compiler": { // compiler name - can be anything. it's doesn't matter
"options": {
"file": "/Users/itaymendel/dev/bit/bitenvs/dist/components/compilers/preact" // Path to the main dist file of the compiler... modify it to the path in your project
}
}
}
},
@itaymendel
itaymendel / bit-workspace-config-with-many-compilers.md
Last active May 16, 2019 14:29
envs overrides in a Bit workspace configuration

This snippet covers a few possible features and configuration.

  1. line 4 - define a default compiler for all tracked component. its possible to leave it empty.
  2. line 7 - override configurations for all component IDs that starts with "ui/".
  3. line 9 - define another compiler for "ui/*".
  4. line 12 - you can keep setting other rules to override other subset of components. for example - components starting with "utils/*"
  5. line 17 - can set a specific component ID to overrides.
  6. line 19 - use "-" to remove the compiler definition from component.
@itaymendel
itaymendel / 0_reuse_code.js
Created December 6, 2016 13:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@itaymendel
itaymendel / Vagrantfile
Created August 4, 2015 22:39
statsd-grphite-grafana on vagrant using docker-compose
# -*- mode: ruby -*-
# vi: set ft=ruby :
unless Vagrant.has_plugin?("vagrant-docker-compose")
raise 'please run: vagrant plugin install vagrant-docker-compose'
end
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
@itaymendel
itaymendel / toggl-google-spreadsheet-integration
Last active February 12, 2020 00:13
A code behind for google-spreadsheet that loads data from Toggl.com for a monthly work hours per client. I used https://developers.google.com/apps-script/guides/sheets for the helper methods, and https://github.com/toggl/toggl_api_docs for the toggl API
// global
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Sheet1');
var clientName = '';
var workspaceID = '';
var togglKey = ''
var togglConOptions = {
'method': 'get',
'headers': {
'Content-type': 'application/json',
'Authorization': "Basic " + Utilities.base64Encode(togglKey + ":api_token")