-
Use the Download button on www.cursor.com web site. It will download the
NAME.AppImagefile. -
Copy the .AppImage file to your Applications directory
cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImageUse the Download button on www.cursor.com web site. It will download the NAME.AppImage file.
Copy the .AppImage file to your Applications directory
cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImageLet suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.
NOTE: This logic can be extended to more than two accounts also. :)
The setup can be done in 5 easy steps:
| # Find the latest version on https://github.com/creationix/nvm#install-script | |
| $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | |
| # Add in your ~/.zshrc the following: | |
| export NVM_DIR=~/.nvm | |
| [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" | |
| $ source ~/.zshrc |
| # Copyright 2017 Intel Corporation | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # -*- coding: utf-8 -*- | |
| # /var/runtime/awslambda/bootstrap.py | |
| """ | |
| aws_lambda.bootstrap.py | |
| Amazon Lambda | |
| Copyright (c) 2013 Amazon. All rights reserved. | |
| Lambda runtime implemention | |
| """ |
| let elliptic = require('elliptic'); | |
| let sha3 = require('js-sha3'); | |
| let ec = new elliptic.ec('secp256k1'); | |
| // let keyPair = ec.genKeyPair(); | |
| let keyPair = ec.keyFromPrivate("97ddae0f3a25b92268175400149d65d6887b9cefaf28ea2c078e05cdc15a3c0a"); | |
| let privKey = keyPair.getPrivate("hex"); | |
| let pubKey = keyPair.getPublic(); | |
| console.log(`Private key: ${privKey}`); | |
| console.log("Public key :", pubKey.encode("hex").substr(2)); |
| # https://gist.github.com/althonos/6914b896789d3f2078d1e6237642c35c | |
| [metadata] | |
| name = {name} | |
| version = file: {name}/_version.txt | |
| author = Martin Larralde | |
| author_email = [email protected] | |
| url = https://github.com/althonos/{name} | |
| description = {description} | |
| long_description = file: README.md |
| from channels.auth import AuthMiddlewareStack | |
| from rest_framework.authtoken.models import Token | |
| from django.contrib.auth.models import AnonymousUser | |
| from django.db import close_old_connections | |
| class TokenAuthMiddleware: | |
| """ | |
| Token authorization middleware for Django Channels 2 | |
| """ |
| export const fetchAsBlob = url => fetch(url) | |
| .then(response => response.blob()); | |
| export const convertBlobToBase64 = blob => new Promise((resolve, reject) => { | |
| const reader = new FileReader; | |
| reader.onerror = reject; | |
| reader.onload = () => { | |
| resolve(reader.result); | |
| }; | |
| reader.readAsDataURL(blob); |