Skip to content

Instantly share code, notes, and snippets.

View faytekin's full-sized avatar

Fatih Aytekin faytekin

View GitHub Profile
@faytekin
faytekin / RecaptchaV2Rule.php
Last active June 2, 2022 10:59
Laravel ReCaptcha v2 validation rule
<?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
use Illuminate\Support\Facades\Http;
class RecaptchaRule implements Rule
{
public static function make(): static
@faytekin
faytekin / SoapWatcher.php
Last active August 17, 2021 13:19
Soap Laravel Telescope Watcher
<?php
namespace App\Services;
use Laravel\Telescope\IncomingEntry;
use Laravel\Telescope\Telescope;
use Laravel\Telescope\Watchers\Watcher;
use RicorocksDigitalAgency\Soap\Facades\Soap;
use RicorocksDigitalAgency\Soap\Request\Request;
use RicorocksDigitalAgency\Soap\Response\Response;
@faytekin
faytekin / add_ssh_key.sh
Created February 18, 2020 12:09
Add my ssh-key to UBUNTU root
#!/bin/bash
# Add my ssh-key to ubuntu root user and active ssh root login
# Login as root or run with sudo
# wget -q -O - "https://gist.github.com/faytekin/474ba0104165924b8850eb7385f7fcc6/raw" | bash -
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
@faytekin
faytekin / 020_build_version.js
Last active November 16, 2017 15:05 — forked from DavidFrahm/020_build_version.js
Cordova build hook, to use build version from config.xml in your hybrid app
#!/usr/bin/env node
// config.xml => <hook src="hooks/020_build_version.js" type="after_prepare" />
// This plugin replaces text in a file with the app version from config.xml.
module.exports = function(ctx) {
var wwwFileToReplace = "js/index.js";
//var fs = require('fs');
var fs = ctx.requireCordovaModule('fs'),
path = ctx.requireCordovaModule('path'),