Skip to content

Instantly share code, notes, and snippets.

View unsalkorkmaz's full-sized avatar

Ünsal Korkmaz unsalkorkmaz

View GitHub Profile
@unsalkorkmaz
unsalkorkmaz / index.js
Last active December 10, 2022 14:37
I wanted a pinia store data that comes from internet with fetching before createRouter() so I could use it for routes in Quasar Framework. My solution;
// /src/router/index.js
import { route } from "quasar/wrappers";
import { createRouter, createMemoryHistory, createWebHistory, createWebHashHistory } from "vue-router";
import routes from "./routes";
import { storeToRefs } from "pinia";
import { useFirmasiteStore } from "stores/firmasite";
/*
* If not building with SSR mode, you can
@unsalkorkmaz
unsalkorkmaz / opera-run.sh
Created November 12, 2019 13:34
[#centos7 opera video codec #bash solution]
#!/bin/bash
latest_version_url=$(curl https://github.com/iteufel/nwjs-ffmpeg-prebuilt/releases/latest -s -L -I -o /dev/null -w '%{url_effective}')
latest_version=${latest_version_url##*/}
zip_name="$latest_version-linux-x64.zip"
dir_to_unzip=/usr/lib64/opera
cd /tmp
@unsalkorkmaz
unsalkorkmaz / ekşisözlük çaylaklar linki
Last active November 11, 2019 11:12
[ekşisözlük çaylaklar linki] Buradaki #javascript kodlarını https://chrome.google.com/webstore/detail/user-javascript-and-css/nbhcbdghjpllgmfilhnhkllmkecfmpld gibi bir eklenti ile eksisozluk için ekleyebilirsiniz. Sonucunda başlık altında seçenek olarak "çaylaklar" diye link eklenmiş olacak. O gün o konuya çaylakların attığı mesajlar listelenir.
if(document.getElementById('topic')) {
var entryurl = document.getElementById('title').getElementsByTagName('a')[0].getAttribute("href");
var newElement = document.createElement('div');
newElement.innerHTML = '<a href="' + entryurl + '?a=caylaklar' + '">çaylaklar</a>';
newElement.id = 'caylaklar';
var topicMenu = document.getElementById('in-topic-search-menu')
@unsalkorkmaz
unsalkorkmaz / showcase_for_editors.php
Last active November 11, 2019 11:13
[firmasite showcase for editors] #firmasite #wordpress
<?php
add_action( 'admin_head', 'firmasite_js_showcase_for_editors',9 );
// add jquery function to admin head to save
function firmasite_js_showcase_for_editors(){
remove_action( 'admin_head', 'firmasite_js_showcase_posts_add_jquery_to_head' );
if ( current_user_can("edit_pages") ){ ?>
<script type="text/javascript" language="javascript">
jQuery(document).ready(function(){