Skip to content

Instantly share code, notes, and snippets.

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

Muhammet ESER eserdinyo

🏠
Working from home
View GitHub Profile
@eserdinyo
eserdinyo / useEmitter.ts
Created November 13, 2023 14:57
Built in eventbus composable for nuxt 3
// composables/useEmitter.ts
export default function () {
const hooks = useNuxtApp().hooks;
return {
emit: hooks.callHook,
on: hooks.hook,
}
}
@eserdinyo
eserdinyo / settings.json
Created December 3, 2020 07:01
lint on save
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript"]
}
@eserdinyo
eserdinyo / search-timer.vue
Created June 13, 2020 08:22
search timer
<template>
<input
v-model="searchWord"
class="searchbar__search--form-input"
type="text"
placeholder="Search"
autocomplete="off"
@keyup="handleSearch"
@blur="closeResult"
>
@eserdinyo
eserdinyo / items.json
Created February 24, 2020 20:27
touchbar preset
This file has been truncated, but you can view the full file.
[
{
"type": "escape",
"width": 64,
"align": "left"
},
{
"type": "brightness",
"width": 80,
"align": "left",
@eserdinyo
eserdinyo / gist:7530f43f9ad3e976b6a78e64190c538f
Created September 30, 2019 18:11 — forked from ehuynh/gist:2572398
Start and Stop Jenkins on OSX
# start
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
# stop
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
@eserdinyo
eserdinyo / init.fish
Created September 29, 2019 10:04
alias for omf
alias pa="php artisan"
alias par="php artisan routes"
alias pam="php artisan migrate"
alias cu="composer update"
alias ci="composer install"
alias ni="npm install"
alias c="clear"
@eserdinyo
eserdinyo / redux.js
Created July 30, 2019 12:53
Add redux devtools to store with middleware
import { createStore, applyMiddleware, compose } from 'redux';
import createSagaMiddleware from 'redux-saga'
import rootReducer from './store'
const sagaMiddleware = createSagaMiddleware()
const store = createStore(rootReducer, compose(
applyMiddleware(sagaMiddleware),
@eserdinyo
eserdinyo / question.java
Created January 7, 2019 17:46
Mobile Programmig Final Exam
#### FRAGMENTS ####
1-)
View view=inflater.inflate(R.layout.fragment_version , container, false);
Apilevel = view.findViewById(R.id.tv_Apilevel);
2-)
ArrayAdapter<String> arrayAdapter=new ArrayAdapter<String>(getActivity(),android.R.layout.simple_list_item_1,listAndroidVersion);
lvVersions.setAdapter(arrayAdapter);
@eserdinyo
eserdinyo / list.html
Last active November 8, 2018 13:29
symfony listing
{% for game in games %}
<tr>
<td>{{game.id}}</td>
<td>{{game.name}}</td>
<td>{{game.price}}</td>
<td><a href="{{ path("edit-game", {'id': game.id} ) }}"> Edit </a></td>
<td><a href="{{ path("delete-game", {'id': game.id} ) }}"> Delete </a></td>
</tr>
{% endfor %}
@eserdinyo
eserdinyo / edit.html
Last active November 8, 2018 13:20
edit form
<form method="post">
<input type="text" name="games[name]" value="{{game.name}}" >
<input type="number" name="games[price]" value="{{game.price}}">
<input type="text" name="games[image]" value="{{game.image}}">
<button type="submit">Kaydet</button>
</form>