Skip to content

Instantly share code, notes, and snippets.

View trkaplan's full-sized avatar

Tuncay Kaplan trkaplan

  • Ankara
View GitHub Profile
@trkaplan
trkaplan / setup-typescript-eslint-prettier.js
Created June 3, 2023 19:28 — forked from chill-cod3r/setup-typescript-eslint-prettier.js
Automate TypeScript ESLint Prettier + my opinionated ESLint rules
const fs = require('fs');
const cp = require('child_process');
const util = require('util');
const path = require('path');
const exec = util.promisify(cp.exec);
const writeFile = util.promisify(fs.writeFile);
const prettierConfigVscode = {
'editor.codeActionsOnSave': {
@trkaplan
trkaplan / til-eslint-otomatik-duzeltme.md
Last active June 2, 2023 22:28
TIL: eslint hatalarını anında otomatik giderme

Çoğu proje Eslint konfigürasyonu ile geldiğinden ve editörümüzde eslint eklentisi kurulu olduğundan biliyor sanıyor olduğunuz bir şeyi netleştirelim: Sorun; build anında aldığımız eslint hatalarını kodu yazıp kaydettiğimiz anda otomatik düzeltilmesini sağlamak: (Eğer linterin bunu düzeltme imkanı varsa, çünkü bazı eslint uyarıları otomatik fixlenemiyor) Lint hatasını almışsak, projede bir linting konfigürasyonu var demektir. Editörde bu hataları görebilmek için eslint eklentisine ihtiyaç duyuyoruz. https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint

Editörde değişiklikler kaydedildiğinde linterın otomatik çalışması için de vs code için; settings.json içinde şu ayara ihtiyaç var:

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@trkaplan
trkaplan / pnpm.command
Created December 8, 2021 17:52 — forked from danielbayley/pnpm.command
A shim to seamlessly alias @npm to @pnpm.
#! /bin/zsh --no-rcs --err-exit
export PATH=node_modules/.bin:$PATH
alias -g i=install
if (($+commands[pnpm])) then
local p=p
alias pnpm=npm npx=pnpx
# FIXME https://github.com/pnpm/pnpm/issues/1360
npm config get -g global-dir | read
@trkaplan
trkaplan / huawei-device-user-agent-fringerprint-list.json
Created September 17, 2021 08:27
List of Huawei Smart Phone Devices (Tablets not included) User Agent Fingerprints Full List: https://github.com/arnaud-engineer/device-data-detector/blob/main/data.js
[
{
"name": "Huawei Y9s / P Smart Pro",
"series": "Y Series",
"userAgentFingerprint": "STK-L21",
"screenSize": 6.59,
"wRes": 1080,
"hRes": 2340
},
{
@trkaplan
trkaplan / accessing_variables_from_iframe_iframe.html
Last active February 14, 2021 18:34
Accessing variables in parent window from iframe
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>iframe</title>
</head>
@trkaplan
trkaplan / settings.json
Created February 14, 2021 10:13
VS Code Settings for Tailwind CSS IntelliSense Extension - autocomplete, syntax highlighting, and linting (tailwind.macro, twin.macro)
{
"editor.quickSuggestions": true,
"tailwindCSS.experimental.classRegex": ["tw`([^`]*)", "tw=\"([^\"]*)", "tw={\"([^\"}]*)", "tw\\.\\w+`([^`]*)", "tw\\(.*?\\)`([^`]*)"],
"tailwindCSS.includeLanguages": {
"typescript": "javascript",
"typescriptreact": "javascript"
}
}
@trkaplan
trkaplan / README-Template.md
Created January 6, 2019 23:10 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@trkaplan
trkaplan / css_resources.md
Created December 7, 2013 00:18 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@trkaplan
trkaplan / javascript_resources.md
Created December 7, 2013 00:18 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage