Skip to content

Instantly share code, notes, and snippets.

View kafkadev's full-sized avatar
🏠
Working from home

Gokhan Celik kafkadev

🏠
Working from home
View GitHub Profile
@kafkadev
kafkadev / gist:cc57c1a7c605c8410c82d7be9efd3cab
Created February 23, 2017 20:02 — forked from marty-wang/gist:5a71e9d0a6a2c6d6263c
Compile and deploy React Native Android app of Release version to device.
Disclaimer: The instructions are the collective efforts from a few places online.
Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did.
First off, bundle.
==================
1. cd to the project directory
2. Start the react-native packager if not started
3. Download the bundle to the asset folder:
curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle"
@kafkadev
kafkadev / form.component.ts
Created February 15, 2017 16:24
bağımsız form
onSubmit(value) {
console.log(value.value);
}
<form #f="ngForm" (ngSubmit)="onSubmit(f)">
<legend>Form title builder</legend>
<fieldset ngModelGroup="name">
<label>Firstname:</label>
<input type="text" name="firstname" ngModel>
<mdl-table-selectable mdl-shadow="2"
[table-model]="tableModel"
[table-model-selected]="selected"
(table-model-selectionChanged)="selectionChanged($event)">
</mdl-table-selectable>
@kafkadev
kafkadev / server.js
Created February 4, 2017 03:54 — forked from bellbind/server.js
[nodejs][linux][ffmpeg][chrome][html5]live streaming example on linux
var http = require("http");
var cp = require("child_process");
// live streaming example on linux (for chrome, not for firefox)
// for ubuntu, required libavcodec-extra-53 instead of libavcode53
// for ffmpeg command
// see: http://granular.cs.umu.se/browserphysics/?p=2287
var server = http.createServer(function (req, res) {
console.log(req.url);
@kafkadev
kafkadev / app.js
Created February 1, 2017 16:11 — forked from bingeboy/app.js
Upload and display image with NodeJS and Express.
/*
* Module dependencies.
*/
var express = require('express')
, routes = require('./routes')
, user = require('./routes/user')
, common = require('./routes/common')
, fs = require('fs')
, http = require('http')
, util = require('util')
@kafkadev
kafkadev / index.php
Created February 1, 2017 04:52 — forked from linktohack/index.php
Adminer 4.2.5 loader without password for SQLite
<?php
function adminer_object() {
class AdminerSoftware extends Adminer {
function login($login, $password) {
return true;
}
}
return new AdminerSoftware;
}
include "./adminer-4.2.5.php";
@kafkadev
kafkadev / watermark.html
Created January 1, 2017 15:19 — forked from mloberg/watermark.html
Watermark PHP
<img src="watermark.php?watermark=watermark.png&src=test.jpg" />
<?php
$factory->define(App\User::class, function (Faker\Generator $faker) { static $password; return [ 'name' => $faker->name, 'email' => $faker->safeEmail, 'password' => $password ?: $password = bcrypt('secret'), 'remember_token' => str_random(10), ]; });
@kafkadev
kafkadev / 0_reuse_code.js
Created December 21, 2016 18:39
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
<?php
interface Bitki {
public function familya();
public function govde();
}
interface Agac extends Bitki{
public function yaprak();
}