Adem Kıvanç

PHP - Js Developer

Menu Close

React Pokedex

A mini-encyclopedia of Pokémon stats, types and moves.

The following technologies were used for this sample application:


npm install
npm start

To view the end result visit DEMO

Authentication with React and Node.js (Express) JWT

This is an simple application that serves an ExpressJS JWT to a React client application. Database not used in this app


cd server
npm install
node app.js

cd client
npm install
npm start

User name : admin

Password: password

React News Reader Site Example

This is a sample news site I used to get started with ReactJS. It shows how to simply use the hooks and redux and NewsApi.

To view the end result visit DEMO


Getting started

This project was bootstrapped with Create React App.

To get started simply run

npm install.

Once the installation process is done just runnpm start.

VerbalExpressions ile regular expressions artık çocuk oyuncağı

Basit ve okunaklı regex kontrolleri yazmak için geliştirilmiş güzel bir kütüphane VerbalExpressions.

Kütüphane her dil için yazılmış.

Js için olan örnek aşağıdaki gibi.

// Create an example of how to test for correctly formed URLs
var tester = VerEx()
    .anythingBut(' ')

// Create an example URL
var testMe = '';

// Use RegExp object's native test() function
if (tester.test(testMe)) {
    alert('We have a correct URL'); // This output will fire
} else {
    alert('The URL is incorrect');

console.log(tester); // Outputs the actual expression used: /^(http)(s)?(\:\/\/)(www\.)?([^\ ]*)$/

Nightmare kullanarak facebook crawler yapmak

Nightmare üst düzey bir tarayıcı otomasyon javascript kütüphanesi. Nightmare Electron altyapısını  kullanarak, crawling ve test otomasyonu yazmanızı kolaylaştıran bir kütüphane.

Örnek olarak,  facebook new feed (giriş sayfası) gönderilerini  ayrıştıralım (parsing) .


const Nightmare = require("nightmare");
const vo = require('vo');

const nightmare = Nightmare({
    show: true,
    typeInterval: 20,
    waitTimeout: 60000,
    gotoTimeout: 60000

var run = function*() {

    yield nightmare
        .viewport(1024, 768)
        .type('#email', '')
        .type('#pass', 'xxxxx')
        .click('#loginbutton input')
        .evaluate(function () {
            window.document.body.scrollTop = document.body.scrollHeight;

    //todo we can make infinite loop
    for (var i = 0; i < 2; i++) {

        yield nightmare
            .evaluate(function () {
                var content = [];
                document.querySelectorAll('div[role=feed] .fbUserPost').forEach(function (element) {
                    if (element.querySelector('h5')) {

                        var postVideo = null, postImage = null;

                        if (element.querySelector('video')) {
                            postVideo = element.querySelector('video').src

                        if (element.querySelector('a img')) {
                            postImage = element.querySelector('a img').src

                            text: element.querySelector('.userContent').innerText,
                            video: postVideo,
                            image: postImage,
                            user: {
                                name: element.querySelector('h5').innerText,
                                link: element.querySelector('h5 a').href
                return content;
            .then(function (result) {

        yield nightmare
            .evaluate(function () {
                window.document.body.scrollTop = document.body.scrollHeight;
    yield nightmare.end();

vo(run)(function (err) {
    if (err) {

Vue.js ile mobil uygulama geliştirme ortamları

Hibrit mobil uygulamalar gittikçe yaygınlaşıyor. Vujs için hibrit uygulama geliştirme ortamlarını şöyle sıraladım.

Data Gif Maker Released By Google News Lab

For details

Creating basic Nodejs and Express Web App


OS XThe easiest way to install Node.js on OS X is to use the official installer from You can also use Homebrew if you prefer.
WindowsThe easiest way to install Node.js on Windows is the official installer from You can also use Chocolatey if you prefer.
LinuxThe exact instructions to install Node.js vary by distribution. Find instructions for yours here.


Read more

Cache Permissions and Roles with Entrust Laravel

Don’t forget for performance: ‘ttl’ => 60, is missing in config/cache.php

Entrust is a succinct and flexible way to add Role-based Permissions to Laravel 5.

Tips on Laravel 5 authentication views

As standard template folders views/auth/login.blade.php and register.blade.php set the auth.

Add loginView and registerView properties so you can switch between templates.



class AuthController extends Controller
    | Registration & Login Controller
    | This controller handles the registration of new users, as well as the
    | authentication of existing users. By default, this controller uses
    | a simple trait to add these behaviors. Why don't you explore it?

    use AuthenticatesAndRegistersUsers, ThrottlesLogins;

     * Where to redirect users after login / registration.
     * @var string
    protected $redirectTo = '/';

     * Show the application login / registration form.
     * @var string
    protected $loginView = 'template1.login';
    protected $registerView = 'template1.register';

     * Create a new authentication controller instance.
     * @return void
    public function __construct()
        //switch templates
        $this->loginView = config('').".login";
        $this->registerView = config('').".register";
        $this->middleware('guest', ['except' => 'logout']);