Skip to content

Instantly share code, notes, and snippets.

View ozcanzaferayan's full-sized avatar
⚛️
Overreacting

Özcan Zafer AYAN ozcanzaferayan

⚛️
Overreacting
View GitHub Profile
@kawanet
kawanet / material-colors.json
Last active March 23, 2025 04:07
Material Design Style Color Palette as JSON
{
"red": {
"50": "#ffebee",
"100": "#ffcdd2",
"200": "#ef9a9a",
"300": "#e57373",
"400": "#ef5350",
"500": "#f44336",
"600": "#e53935",
"700": "#d32f2f",
@jarretmoses
jarretmoses / React Native Clear Cache
Last active April 13, 2025 12:22
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
/*
* Copyright 2017 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@enginkartal
enginkartal / js-turkish-to-english.js
Last active April 22, 2024 13:11
Javascript Turkish character to english characters change
String.prototype.turkishtoEnglish = function () {
return this.replace('Ğ','g')
.replace('Ü','u')
.replace('Ş','s')
.replace('I','i')
.replace('İ','i')
.replace('Ö','o')
.replace('Ç','c')
.replace('ğ','g')
.replace('ü','u')
@nickbutcher
nickbutcher / MainActivity.kt
Last active February 22, 2024 21:17
Demonstrating how to tile a (Vector) Drawable
/*
* Copyright 2017 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@ademilter
ademilter / package.json
Last active February 13, 2020 11:47
use flickity with gastby
{
"dependencies": {
"flickity": "^2.2.1"
"react-flickity-component": "^3.5.0"
}
}
import { useState, useLayoutEffect } from 'react'
const useLocalStorage = (key, defaultValue = null, prefix = 'store') => {
const storeKey = `${prefix}-${key}`
const [value, setValue] = useState(() => {
const data = localStorage.getItem(storeKey)
return data === null ? defaultValue : JSON.parse(data)
})
@oksuz
oksuz / README.md
Last active August 12, 2020 12:13
Console tool for shortening urls through bitly
@armanozak
armanozak / diacritics.js
Created October 7, 2020 08:50
[Normalize Diacritics] Convert diacritics to Latin-1 (ISO/IEC 8859-1) #tip #javascript
const diacriticsMap = {
: 'a',
: 'A',
: 'a',
á: 'a',
Á: 'A',
à: 'a',
À: 'A',
ă: 'a',
Ă: 'A',
@milikkan
milikkan / gist:b21072b4ac7a127ffb148f4a05a6fa69
Created January 3, 2021 12:26
if-else kullanmadan not hesaplama
import java.util.Comparator;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
public class Notlar {
public static void main(String[] args) {
Map<Integer, String> notHarfleri = new HashMap<>();
notHarfleri.put(90, "AA ile dersi geçtiniz.");
notHarfleri.put(85, "BA ile dersi geçtiniz.");