- forth
- point-mutations
- rational-numbers
- reverse-string
- variable-length-quantity
- zipper
- complex-numbers
| AllCops: | |
| TargetRubyVersion: 2.5 | |
| Exclude: | |
| - 'config/**/*.rb' | |
| - 'db/**/*.rb' | |
| - '**/Rakefile' | |
| - '**/config.ru' | |
| - '**/spec_helper.rb' | |
| - '**/rails_helper.rb' | |
| - 'lib/tasks/db_extensions.rake' |
| # For stackoverflow question: https://stackoverflow.com/questions/55339129/how-to-test-lock-mechanism | |
| require "bundler/inline" | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| # Activate the gem you are reporting the issue against. |
| // These are my notes from learning Rust Macros during a meetup | |
| // https://www.meetup.com/rustox/events/256709420/ | |
| // I had not done any Rust before - but was still able to learn a lot!! | |
| use std::collections::HashMap; | |
| // All these macros run at compile time | |
| // Simplest macro | |
| macro_rules! hello { |
| class ChangePlayersIdToUuid < ActiveRecord::Migration[5.2] | |
| def change | |
| # Enable extension | |
| enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto') | |
| # Create temp column and generate random uuids for existing data | |
| add_column :players, :uuid, :uuid, default: "gen_random_uuid()", null: false | |
| remove_column :players, :id | |
| rename_column :players, :uuid, :id |
| data Or a b = Fst a | Snd b deriving (Eq, Show) | |
| instance (Semigroup a, Semigroup b) => Semigroup (Or a b) where | |
| (Fst a) <> (Fst a') = Fst (a <> a') | |
| (Snd b) <> _ = Snd b | |
| _ <> (Snd b) = Snd b | |
| orGen :: (Arbitrary a, Arbitrary b) => Gen (Or a b) | |
| orGen = do | |
| a <- arbitrary |
| type FunA = (foo: number, bar: string) => void; | |
| type FunB = (foo: boolean, bar: number) => void; | |
| type FunctionUnion = | |
| | FunA | |
| | FunB | |
| declare var f1: FunA; // value of type FunA | |
| declare var f2: FunB; // value of type FunB |
| "use strict"; | |
| const webpack = require("webpack"); | |
| const path = require("path"); | |
| const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
| const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
| const devMode = process.env.NODE_ENV !== "production"; | |
| module.exports = { | |
| entry: ["babel-polyfill", "./src/index.js"], |
Create a simple VueJS application with the following functionalities:
The app will have two routes: /profiles and /repos - look at vue-router on how to create page routes.
/profiles page will have a text box which will accept github username and on pressing submit will display following info about the user:
| 'use strict'; | |
| var VALID_DIRECTIONS = ['north', 'east', 'south', 'west']; | |
| var INSTRUCTION_KEYS = { | |
| A: 'advance', | |
| L: 'turnLeft', | |
| R: 'turnRight' | |
| }; | |
| function Robot() { |