Skip to content

Instantly share code, notes, and snippets.

View serefercelik's full-sized avatar

Şeref Erçelik serefercelik

View GitHub Profile
@SibghatUllah1997
SibghatUllah1997 / BnbStaking.sol
Last active December 16, 2023 13:00
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.6.12+commit.27d51765.js&optimize=true&runs=200&gist=
pragma solidity 0.6.12;
import '@pancakeswap/pancake-swap-lib/contracts/math/SafeMath.sol';
import '@pancakeswap/pancake-swap-lib/contracts/token/BEP20/IBEP20.sol';
import '@pancakeswap/pancake-swap-lib/contracts/token/BEP20/SafeBEP20.sol';
import '@pancakeswap/pancake-swap-lib/contracts/access/Ownable.sol';
// import "@nomiclabs/buidler/console.sol";
interface IWBNB {
@cagcak
cagcak / turkish_NumberToWords.js
Created September 29, 2019 09:27
A function that converts a number to words in Turkish
const turkish_NumberToWords = (number = 0) => {
/*
* Assign spelling words in seperate arrays
*/
const steps = ['', 'bir', 'iki', 'üç', 'dört', 'beş', 'altı', 'yedi', 'sekiz', 'dokuz']
const tens = ['', 'on', 'yirmi', 'otuz', 'kırk', 'elli', 'altmış', 'yetmiş', 'seksen', 'doksan']
const hundreds = ['', 'yüz', 'ikiyüz', 'üçyüz', 'dörtyüz', 'beşyüz', 'altıyüz', 'yediyüz', 'sekizyüz', 'dokuzyüz']
const nS = ['', 'bin', 'milyon', 'milyar', 'trilyon', 'katrilyon', 'kentilyon', 'seksilyon', 'septilyon', 'oktilyon']
/*
* Maximum number step is 30
@serefercelik
serefercelik / yokVT.sql
Created November 29, 2018 11:19 — forked from hkulekci/yokVT.sql
üniversite - fakülte - bölüm
CREATE TABLE `yok_bolumler` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`fakulteId` varchar(40) NOT NULL,
`universiteId` int(6) NOT NULL,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
KEY `fakulteHash` (`fakulteId`)
) ENGINE=MyISAM;
INSERT INTO `yok_bolumler` (`id`, `fakulteId`, `universiteId`, `name`) VALUES
@thbkrkr
thbkrkr / Dockerfile
Last active June 8, 2022 21:07
Get containers info and stats using the Docker Remote API
FROM alpine:3.7
RUN apk --no-cache add bash jq netcat-openbsd bc
COPY docker-stats.sh /usr/local/bin/docker-stats.sh
ENTRYPOINT ["docker-stats.sh"]
@cferdinandi
cferdinandi / foreach.js
Last active October 1, 2020 08:01
A simple forEach() implementation for Arrays, Objects and NodeLists. Forked from ForEach.js by Todd Motto. https://github.com/toddmotto/foreach
/**
* A simple forEach() implementation for Arrays, Objects and NodeLists
* @private
* @param {Array|Object|NodeList} collection Collection of items to iterate
* @param {Function} callback Callback function for each iteration
* @param {Array|Object|NodeList} scope Object/NodeList/Array that forEach is iterating over (aka `this`)
*/
var forEach = function (collection, callback, scope) {
if (Object.prototype.toString.call(collection) === '[object Object]') {
for (var prop in collection) {