Skip to content

Instantly share code, notes, and snippets.

View sovetski's full-sized avatar
🎯
Focusing

Ahliman HUSEYNOV sovetski

🎯
Focusing
View GitHub Profile
@BjornDCode
BjornDCode / gist:5cb836a6b23638d6d02f5cb6ed59a04a
Created February 3, 2020 11:58
Tailwind - Fixed sidebar, scrollable content
// Source: https://twitter.com/calebporzio/status/1151876736931549185
<div class="flex">
<aside class="h-screen sticky top-0">
// Fixed Sidebar
</aside>
<main>
// Content
</main>
@btoo
btoo / .huskyrc.js
Last active June 17, 2024 07:55
husky pre-commit hook for handling ONLY staged files that will prevent commit if there are linting errors and auto-fix them
/**
* @see {@tutorial https://github.com/typicode/husky}
* _Requires Node >= 10 and Git >= 2.13.0._
*/
module.exports = {
hooks: {
/**
* @see {@tutorial https://stackoverflow.com/a/15656652/3942699}
*
* ___only works with files staged in git___
@patrickmaciel
patrickmaciel / configuracoes.md
Created April 18, 2021 00:30
Laragon + Mailhog
@botris
botris / BulkUpdateController.php
Last active March 24, 2025 08:26
Update many entities with API Platform
<?php
class BulkUpdateController
{
private EntityWithManyProperties $entityWithManyProperties;
public function __construct(EntityWithManyProperties $entityWithManyProperties)
{
$this->entityWithManyProperties = $entityWithManyProperties;
}
@mark-gerarts
mark-gerarts / OAuthConnectController.php
Last active June 21, 2024 12:09
HWIOAuthBundle connect functionality without FUB
<?php
namespace Acme\Controller;
use HWI\Bundle\OAuthBundle\Templating\Helper\OAuthHelper;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Security\Http\Util\TargetPathTrait;
@mikegogulski
mikegogulski / copy-stripe-setup.py
Last active October 11, 2024 14:45
Copy Stripe production products and prices to test environment
### The best way to start is to use the "Delete all test data" button at https://dashboard.stripe.com/test/developers
### Setup:
import stripe
test = 'sk_test_51IXXXyoursecretkey'
prod = 'sk_live_51IXXXyoursecretkey'
@codeadamca
codeadamca / mamp-php-versions.md
Last active February 11, 2025 19:08
How to add new PHP versions to MAMP on a Mac

Adding Versions of PHP to MAMP on a Mac

If you're working on a project that requires a version of PHP higher than the versions that MAMP comes with, you can easily add additional verions.

My version of MAMP came installed with PHP 7.4.21 and 8.0.8. I'm attempting to use MAMP to host a Laravel application which requires at least PHP 8.1.

The version of PHP MAMP uses is often different than the version you have installed. I have installed PHP using Brew. I'm currently running PHP 8.1.8. If you want to check your installed version of PHP, use the terminal and run the following command:

php --version
@checklyalex
checklyalex / upload_image_to_s3_bucket.js
Created March 24, 2023 15:11
A Checkly Playwright/Test script to upload a screenshot to S3.
const { expect, test } = require('@playwright/test')
const aws4 = require('aws4')
const axios = require('axios').default
const S3_BUCKET_NAME = 'xxx';
const S3_OBJECT_KEY = '/image.jpg'; // The name you want to give to the uploaded image file
const AWS_REGION = 'eu-west-2'
test('visit page and take screenshot', async ({ page }) => {
const response = await page.goto(process.env.ENVIRONMENT_URL || 'https://checklyhq.com')
@audrasjb
audrasjb / wp-playground-opquast-widget
Last active January 16, 2025 09:00
WordPress Playground instance for Opquast widget
{
"landingPage": "/wp-admin/",
"login": true,
"plugins": [
"https://jeanbaptisteaudras.com/plugins/who-opquast-widgets.zip"
],
"siteOptions": {
"blogname": "Le joli widget Opquast"
}
}