Install Cloud9 first as [username]
$ su - [username]
$ wget https://github.com/gbraad/ansible-playbooks/raw/master/playbooks/install-c9sdk.yml
$ ansible-playbook install-c9sdk.yml
version: "3" | |
services: | |
mosquitto: | |
# default user/pass = admin/password | |
container_name: Mosquitto | |
# restart: always | |
# image: eclipse-mosquitto:latest | |
image: arm64v8/eclipse-mosquitto:1.6.12 | |
# image: eclipse-mosquitto:2 |
const fs = require('fs'); | |
try { | |
require('my-package'); | |
console.log('succuss require my-package'); | |
} catch (err) { | |
console.log('failed require my-package'); | |
} | |
fs.symlinkSync('pathToMyPackageInAnotherFolder', './node_modules/my-package', 'dir'); |
import createResolverAndFetcher from '@pnpm/client'; | |
async function test(){ | |
const wantedDep = { alias: '@ci/bixdfh4o-remote.comp1', pref: '' } | |
const resolveOpts = { | |
projectDir: '/tmp/dir', | |
registry: 'http://localhost:4873/' | |
}; | |
const storeDir = '~/.pnpm-store'; | |
const authConfig1 = { |
const { graphql } = require("@octokit/graphql"); | |
function getGqlClient(token){ | |
return graphql.defaults({ | |
headers: { | |
authorization: `token ${token}`, | |
}, | |
}); | |
} |
const { GraphQLClient, gql } = require('graphql-request'); | |
const scopes = ['your-scopes']; | |
const uri = `https://symphony.bit.dev/graphql`; | |
const token = 'your-token'; | |
const graphQLClient = new GraphQLClient(uri, { | |
headers: { | |
authorization: `Bearer ${token}` | |
} | |
}); | |
const deleteScopeQuery = gql` |
//IMPORTANT - install this before: npm i child-process-promise --save-dev | |
/* | |
put this in your package.json script: | |
"install-collection": "node install-collection.js" | |
npm run install-collection <user>.<collection> | |
*/ | |
const exec = require('child-process-promise').exec; | |
const args = process.argv; | |
const remote = args[2]; |
const COMPONENT_ORIGINS = { | |
IMPORTED: 'IMPORTED', | |
AUTHORED: 'AUTHORED', | |
NESTED: 'NESTED' // which is a nested dependency | |
}; | |
ComponentOrigin = $Keys<typeof COMPONENT_ORIGINS>; | |
type PathOsBased = string; // OS based format. On Windows it's Windows format, on Linux it's Linux format. | |
type PathOrDSL = PathOsBased | string; // can be a path or a DSL, e.g: tests/{PARENT}/{FILE_NAME} | |
type Warnings = { |
scope=$1 | |
if [ -z "$scope" ] | |
then | |
echo "please provide scope" | |
else | |
components=$(bit ls ${scope} -j | jq -r '.[].id' | sed 's/\[Deprecated]//g') | |
num_components=$(echo "$components" | wc -w | xargs) | |
echo "found $num_components in scope $scope" | |
bit import $components | |
fi |
function* numbers() { | |
let index = 1; | |
while(true) { | |
yield index; | |
index = index + 1; | |
if (index > 10) { | |
break; | |
} | |
} | |
} |