Skip to content

Instantly share code, notes, and snippets.

Avatar
🇯🇴
Free Palestine

Mustafa Zuvin mzuvin

🇯🇴
Free Palestine
View GitHub Profile
@mzuvin
mzuvin / Program.cs
Created Mar 20, 2021
ChangeTracker
View Program.cs
//https://stackoverflow.com/a/65642075/9218468
using System;
using System.Collections.Generic;
using System.Linq;
namespace ChangeTracker
{
public class ChangeTracker<T1, T2>
{
private readonly IEnumerable<T1> oldValues;
@mzuvin
mzuvin / addHours.js
Created May 7, 2020
javascript addHours list range
View addHours.js
Date.prototype.addHours = function(h) {
this.setTime(this.getTime() + (h * 60 * 60 * 1000));
return this;
}
var startDate = new Date('Sun Apr 19 2020 07:00:00 GMT+0300 (GMT+03:00)');
var finishDate = new Date('Sun Apr 19 2020 10:00:00 GMT+0300 (GMT+03:00)');
checkedList = []
while (startDate < finishDate) {
View cassandra.md

CREATE KEYSPACE streamkeyspace WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 3};

CREATE TABLE IF NOT EXISTS streamkeyspace.user ( 
  id uuid PRIMARY KEY, 
  created_time timestamp, 
  username text, 
  password text, 
  email text
@mzuvin
mzuvin / ajaxPreFilter.js
Created Dec 29, 2019
FREERİCE TRANSLATE Js BOOKMARKLET
View ajaxPreFilter.js
/*
Coder by Mustafa
29.12.19 21:30
Ajax Mudehale ile FreeRice sitesinde çeviri işlemi
*/
// thanks https://gist.github.com/liron-navon/eff96016a233f102fe43030c3a16f4a5
const APIKEY = 'trnsl.1.1.20191229T171159Z.1c8e8e7908ec7585.bedb9463e1aa12faa0798882dc1742e44dc0ad53';
const FROM = 'en';
// default source language
const TO = 'tr';
View sort.js
str="mustafa"
str2=[]
// 0.adım string dizisini sayısal değerlere çevir.
for (var i=0; i<str.length;i++){
str2.push(str[i].charCodeAt(0))
}
//1. adım: dizideki i. sırasından sonraki en küçük sayının yerini bul.
function selectionSort(num) {