Skip to content

Instantly share code, notes, and snippets.

@wheel1992
wheel1992 / App.test.js
Created January 11, 2023 07:34
Cove Test
import { render, screen } from '@testing-library/react';
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import Page from './good';
const server = setupServer(
rest.get(
'https://my-json-server.typicode.com/savayer/demo/posts',
(req, res, ctx) => {
return res(
void main() {
print('QUESTION 4');
const _data = {
"T": "Together",
"E": "Everyone",
"A": "Achieves",
"M": "More"
};
void main() {
print('QUESTION 3');
String _result = "";
const _data = ["f", "u", "n"];
for(var i = 0; i < _data.length; i++) {
_result += _data[i] * (i + 1);
}
print(_result);
void main() {
print('QUESTION 2');
final _alphabets = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
final _result = '${_alphabets[5]}${_alphabets[0]}${_alphabets[1]}${_alphabets[20]}${_alphabets[11]}${_alphabets[14]}${_alphabets[20]}${_alphabets[18]}';
print(_result);
}
void main() {
print('QUESTION 1');
const _data = ['f', 'r', 'e', 's', 'h'];
final _result = _data.join('-').toUpperCase();
print(_result);
}
@wheel1992
wheel1992 / git.migrate
Created August 22, 2018 00:11 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.