Skip to content

Instantly share code, notes, and snippets.

View tpaksu's full-sized avatar
🐰
Follow the white rabbit. Also, 🍌!

Taha Paksu tpaksu

🐰
Follow the white rabbit. Also, 🍌!
View GitHub Profile
@tpaksu
tpaksu / userscript.js
Created April 7, 2021 11:28
Open github files in vscode
// ==UserScript==
// @name Open github files in vscode
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Taha PAKSU
// @match https://github.com/*/tree/*
// @grant none
// ==/UserScript==
@tpaksu
tpaksu / Kernel.php
Created December 9, 2020 13:36
Laravel Artisan command to perform MySQL Dump using database connection information in the .env file. Forked from https://gist.github.com/kkiernan/bdd0954d0149b89c372a
<?php
namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel
{
/**
// replace your start date instance onfirstselect event with this:
onfirstselect: function (instance, start) {
startDate = start.clone();
startInstance.globals.startSelected = false;
startInstance.hideDropdown();
endInstance.showDropdown();
endInstance.setDisplayDate(start.clone());
endInstance.config.minDate = startDate.clone();
endInstance.config.startDate = startDate.clone();
@tpaksu
tpaksu / javascript-plugin-patterns-FOUND-protoytpe-newed.js
Created March 6, 2020 11:57 — forked from mhulse/javascript-plugin-patterns-FOUND-protoytpe-newed.js
Some of my favorite JavaScript plugin design patterns: The Facade Pattern, The Revealing Module Pattern, Immediately-invoked Function Expressions (IIFE)s, The Module Pattern imports and exports
// http://callmenick.com/post/slide-and-push-menus-with-css3-transitions
(function(window) {
'use strict';
/**
* Extend Object helper function.
*/
function extend(a, b) {
@tpaksu
tpaksu / visibleCount.js
Created September 9, 2019 09:09
nightwatch assert.visibleCount
module.exports.assertion = function(selector, count, message = null) {
this.message =
message ||
`Asserting that there are "${count}" visible elements that match "${selector}"`;
this.expected = count;
this.pass = function(value) {
return value === this.expected;
};
this.value = function(result) {
return result.value;
@tpaksu
tpaksu / renew.sh
Created January 19, 2018 07:35
laragon refresh certificates
#!/bin/sh
CRTPATH=$(pwd -W)
for i in *.key ; do
DOMAIN=${i%.key}
cat << EOF > openssl_$DOMAIN.conf
[req]
distinguished_name = req_distinguished_name
req_extensions = v3_req
prompt = no
[req_distinguished_name]