Skip to content

Instantly share code, notes, and snippets.

View indatawetrust's full-sized avatar
🏠
Working from home

Ahmet Simsek indatawetrust

🏠
Working from home
View GitHub Profile
@indatawetrust
indatawetrust / colors.json
Created February 23, 2022 07:30
pastel colors
{
"PASTEL_GREEN": "rgb(119, 221, 119)",
"PASTEL_BROWN": "rgb(131, 105, 83)",
"BABY_BLUE": "rgb(137, 207, 240)",
"PASTEL_TURQUOISE": "rgb(153, 197, 196)",
"BLUE_GREEN_PASTEL": "rgb(154, 222, 219)",
"PERSIAN_PASTEL": "rgb(170, 148, 153)",
"MAGIC_MINT": "rgb(170, 240, 209)",
"LIGHT_PASTEL_GREEN": "rgb(178, 251, 165)",
"PASTEL_PURPLE": "rgb(179, 158, 181)",
@indatawetrust
indatawetrust / random_object_id.js
Last active January 28, 2021 13:40
random object id
const randomObjectId = () => Array(2).fill().map(() => Math.random().toString(16).slice(2)).join('')
import io from 'socket.io-client';
import feathers from '@feathersjs/feathers';
import socketio from '@feathersjs/socketio-client';
import auth from '@feathersjs/authentication-client';
const URL = 'http://localhost:3030';
const socket = io(URL);
const feathersClient = feathers()
.configure(socketio(socket))
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
hello
</body>
import 'dart:async';
Timer interval(Duration duration, func) {
Timer function() {
Timer timer = new Timer(duration, function);
func(timer);
return timer;
}
@indatawetrust
indatawetrust / fix-translate.js
Last active August 4, 2020 16:44
fix-translate.js
const { set, get } = require('lodash')
const tr = require('./public/locales/tr/translation.json')
const en = require('./public/locales/en/translation.json')
const fs = require('fs')
const newEn = {}
const keys = []
const walker = (obj, topKey) => {
for (let [key, value] of Object.entries(obj)) {
android update sdk --no-ui --all --filter build-tools-28.0.3,android-28,extra-android-m2repository
import React from 'react';
import { useFormik } from 'formik';
import styled from 'styled-components';
import * as yup from 'yup';
let validationSchema = yup.object().shape({
email: yup.string().email().required(),
password: yup.string().min(5).max(25).required(),
});
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT
BEGIN
DECLARE _N INT;
SET _N = N - 1;
RETURN (
# Write your MySQL query statement below.
select (
select distinct Salary from Employee order by Salary desc limit 1 offset _N
) as getNthSalary
);
@indatawetrust
indatawetrust / test.js
Last active May 16, 2020 13:56
expressjs endpoint testing with ava + supertest + @hapi/joi
const test = require('ava')
const request = require('supertest')
const app = require('../lib/infra')
const Joi = require('@hapi/joi')
const agent = request.agent(app)
test('main', async (t) => {
const { body } = await agent.get('/')