Skip to content

Instantly share code, notes, and snippets.

View ozcanzaferayan's full-sized avatar
⚛️
Overreacting

Özcan Zafer AYAN ozcanzaferayan

⚛️
Overreacting
View GitHub Profile
@ozcanzaferayan
ozcanzaferayan / electrode-native-helloworld2.md
Created November 5, 2021 13:31 — forked from hemanth-manoharan/electrode-native-helloworld2.md
Tutorial #2: How to add the second mini app to an outer android app

Tutorial #2: How to add the second mini app to an outer android app

This post is the 2nd one in a series of posts on Electrode Native.

It assumes that one has already completed the steps in Tutorial #1 here - https://gist.github.com/hemanth-manoharan/edb363d575d5c9ab22cbc93b595b8fba

  • First, create a second mini-app and publish it to npm as we did in the previous tutorial.

Assuming that the 2nd app is named app2-miniapp

@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.");
@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',
ă: 'a',
Ă: 'A',
@oksuz
oksuz / README.md
Last active August 12, 2020 12:13
Console tool for shortening urls through bitly
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)
})
@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"
}
}
@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
@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')
/*
* 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
@jarretmoses
jarretmoses / React Native Clear Cache
Last active November 25, 2024 15:48
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