Skip to content

Instantly share code, notes, and snippets.

@risul
risul / README.md
Created July 9, 2022 11:59 — forked from mukhortov/README.md
Migrate GitHub issues with comments and labels to Jira

Migrate GitHub issues with comments and labels to Jira

Set up the environment

  1. Instal Deno. It's a secure runtime for JavaScript and TypeScript.
  2. Generate a personal access token for GitHub. And save it to ~/.github-oauth. You can use the following command to save it:
    echo generated_github_personal_access_token_goes_here > ~/.github-oauth
@risul
risul / app-name.config
Created November 16, 2018 17:19 — forked from justindra/app-name.config
Deploy Meteor to AWS Elastic Beanstalk
option_settings:
- option_name: ROOT_URL
value: http://app-name.elasticbeanstalk.com
- option_name: MONGO_URL
value: mongodb://user:pass@some-mongo.com:3001/app-name
- namespace: aws:elasticbeanstalk:container:nodejs
option_name: ProxyServer
var models = {
'user': User,
'todo': Todo
};
server.get( '/:model', function(req, res, next) {
models[req.params.model]
.findAll({}) // .findAll({ include: [ req.body.include ] })
.then(results => { res.send(200, results);}) /// need HTTP status codes
.catch(err { res.send(400, results);});
var models = {
'user': User,
'todo': Todo
};
server.get( '/:model', function(req, res, next) {
models[req.params.model]
.findAll({}) // .findAll({ include: [ req.body.include ] })
.then(results => { res.send(200, results);}) /// need HTTP status codes
.catch(err { res.send(400, results);});
@risul
risul / meteor_oauth_google.md
Created August 3, 2017 15:43 — forked from nickbusy/ meteor_oauth_google.md
Google OAuth for a Meteor web app accessible using multiple domain names (branding)

Multi-domain Meteor app instance and Google OAuth

Overview

Changes to Meteor packages (OAuth & Google) to support Meteor web app deployed under multiple domains (for branding purpose, for example).

Only changes to Google and the core OAuth packages are included here. Other OAuth packages, such as Facebook can be amended in a similar way.

The solution does not include sharing the login state across the domains. If that's what you need, there's another suggested solution for that on the net.

Note: The files attached don't include complete source code from the packages but only changed functions.

@risul
risul / n-to-m.js
Created May 18, 2017 01:17 — forked from moret/n-to-m.js
N to M GraphQL Sequelize Question
import _ from 'underscore';
import Promise from 'bluebird';
import {
GraphQLInt,
GraphQLList,
GraphQLObjectType,
GraphQLSchema,
GraphQLString
} from 'graphql';
import {
@risul
risul / meteor-async.md
Created April 1, 2016 00:50 — forked from joscha/meteor-async.md
Meteor Async Guide

From Meteor's documentation:

In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.

This guide serves as a mini-tour of tools, trix and patterns that can be used to run async code in Meteor.

Basic async

Sometimes we need to run async code in Meteor.methods. For this we create a Future to block until the async code has finished.

@risul
risul / deploy.sh
Created February 27, 2016 11:11 — forked from felipesere/deploy.sh
Deploying form Circle-CI to AWS- ECS
#!/bin/bash
aws --version
aws configure set default.region us-west-2
aws configure set default.output json
echo "preparing task definition"
aws ecs describe-task-definition --task-definition applications | ./jq --arg x $CIRCLE_SHA1 ' .taskDefinition
| del(.status)
| del(.taskDefinitionArn)
@risul
risul / app.config
Created February 23, 2016 22:25 — forked from krishamoud/app.config
Deploy Meteor onto Elastic Beanstalk
option_settings:
- option_name: AWS_SECRET_KEY
value: -------------------------------------------
- option_name: AWS_ACCESS_KEY_ID
value: ------------------------------
- option_name: PORT
value: 8081
@risul
risul / deploy_beanstalk.sh
Created February 23, 2016 19:02 — forked from oriolgual/deploy_beanstalk.sh
Deploy to Beanstalk script taken from Codeship
# Copied from http://www.codeship.io/documentation/continuous-deployment/deployment-to-elastic-beanstalk/
#!/bin/sh
export APP_VERSION=`git rev-parse --short HEAD`
pip install awscli
# clean build artifacts and create the application archive (also ignore any files named .git* in any folder)
git clean -fd
# precompile assets, ...