Skip to content

Instantly share code, notes, and snippets.

View HasanHuseyinDemir's full-sized avatar
👋
Hello There !

Hasan Demir HasanHuseyinDemir

👋
Hello There !
View GitHub Profile
@1Marc
1Marc / reactive.js
Last active November 7, 2024 21:27
Vanilla Reactive System
// Credit Ryan Carniato https://frontendmasters.com/courses/reactivity-solidjs/
let context = [];
export function untrack(fn) {
const prevContext = context;
context = [];
const res = fn();
context = prevContext;
return res;
@HasanHuseyinDemir
HasanHuseyinDemir / namer.js
Last active September 9, 2023 20:37
JSX Element Namer for Template Literals , used it in frameworks I wrote
const namer=(item)=>{
let data = item;
let last="/>";
let first="<";
let count=data.split(last).length-1;
let counted =0;
while(count>counted){
let lastplac=data.search(last)-1;
let i=0;
let deval="";
@serhanozcan
serhanozcan / Responsive-ekran-boyutlari.css
Last active October 11, 2024 18:31
Responsive ekran boyutları ve css media listesi
/*
##Cihaz = Masaüstü
##Ekran = 1281px 'den yüksek çözünürlükler için
*/
@media (min-width: 1281px) {
//CSS
}
@dbisso
dbisso / state.js
Last active September 21, 2024 23:47
Simple state management in vanilla JS
function State() {
this.actions = {};
this.subscriptions = [];
this.history = [];
}
State.prototype.subscribe = function(element, action, callback) {
this.subscriptions[action] = this.subscriptions[action] || [];
this.subscriptions[action].push(function(data) {
callback.apply(element, data);
@serong
serong / iller.json
Created April 4, 2015 15:59
JSON formatında Türkiye'nin illeri.
{
"1": "ADANA",
"2": "ADIYAMAN",
"3": "AFYONKARAHİSAR",
"4": "AĞRI",
"5": "AMASYA",
"6": "ANKARA",
"7": "ANTALYA",
"8": "ARTVİN",
"9": "AYDIN",