Skip to content

Instantly share code, notes, and snippets.

Avatar
🤙

Adem ilter ademilter

🤙
View GitHub Profile
@ademilter
ademilter / til.md
Created May 17, 2020
sequelize "Unknown argument: config"
View til.md

sequelize db:migrate komutu çalıştırdığımızda db'ye bağlanıp tabloları oluşturması gerekirken aşağıdaki çıktıyı ekrana basıyor ve hata vermiyordu.

Sequelize CLI [Node: 14.2.0, CLI: 5.5.1, ORM: 5.21.9]
Loaded configration file "..."
Using enviroment "development"

aynı sorunu yaşarsanız problem büyük ihtimalle node sürümü.

View sublime.config
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.sublime-color-scheme",
"font_size": 14,
"ignored_packages":
[
"Markdown",
"Vintage",
"zzz A File Icon zzz"
],
"line_padding_bottom": 3,
@ademilter
ademilter / blog-post-data.js
Created May 12, 2020
get blog-post with sort date for next js
View blog-post-data.js
import fs from 'fs'
import matter from 'gray-matter'
import { DateTime } from 'luxon'
export default function getBlogPostData(count = 999) {
const files = fs.readdirSync(`${process.cwd()}/content/posts`)
const posts = files.map((filename) => {
const markdownWithMetadata = fs
.readFileSync(`content/posts/${filename}`)
@ademilter
ademilter / code.sh
Created May 5, 2020
npm packages update like yarn upgradeInteractive
View code.sh
npm install npm-check -g
npm-check -u
@ademilter
ademilter / link.js
Created Apr 30, 2020
github create md file with next api
View link.js
@ademilter
ademilter / elementFromPoint.js
Created Mar 21, 2020
get element from point - javascript
View elementFromPoint.js
const on_hover = e => {
const $target = document.elementFromPoint(e.clientX, e.clientY)
console.log($target)
}
document.body.addEventListener('mousemove', on_hover)
@ademilter
ademilter / my-element.js
Created Mar 21, 2020
web component example
View my-element.js
const template = document.createElement('template')
template.innerHTML = `
<style>
.red {
color: red;
}
</style>
<div class="red">
@ademilter
ademilter / form.html
Created Mar 20, 2020
7) form elemanlarını stillendirelim
View form.html
<html>
<head>
<title>Form ve Elemanları</title>
<link rel="stylesheet" href="main.css" />
</head>
<body>
<!--
- adı *
@ademilter
ademilter / theme.js
Created Mar 9, 2020
theme for styled-system
View theme.js
const toPx = value => `${value}px`
export const colors = {
dark: 'rgb(38, 49, 67)',
white: 'rgba(255, 255, 255, 1)',
black: 'rgba(0, 0, 0, 1)'
}
export const space = []
@ademilter
ademilter / example.js
Last active Feb 18, 2020
raster grid with gap
View example.js
import Grid from './components/grid'
export default function Grid({ children, gap, ...props }) {
return (
<Grid gap={32} col={4}>
<r-cell>cell</r-cell>
<r-cell>cell</r-cell>
<r-cell>cell</r-cell>
<r-cell>cell</r-cell>
</Grid>
You can’t perform that action at this time.