Skip to content

Instantly share code, notes, and snippets.

@pherum
pherum / README.md
Created May 15, 2023 15:38 — forked from KilianSSL/README.md
scrollIntoViewIfNeeded 4 everyone!!!

element.scrollIntoViewIfNeeded Polyfill for everyone

This gist provides a simple JavaScript implementation of the non-standard WebKit method scrollIntoViewIfNeeded that can be called on DOM elements.

Install

npm install element.scrollintoviewifneeded-polyfill

Usage

@pherum
pherum / batchPrettier.md
Created April 15, 2023 11:09 — forked from Mohamed3on/batchPrettier.md
Run prettier on all JS files in a directory
  1. Install prettier
  2. Make a .prettierignore file, and add directories you'd like prettier to not format, for example: **/node_modules
  3. Run prettier --write "**/*.js" *Don't forget the quotes.
  4. Optional: if you want to format JSON/SCSS files too, replace js with json/scss.

Laravel-websockets, SSL Certificate, Let's Encrypt, Certbot, Supervisor, Digitalocean Ubuntu

I did two days work to run laravel-websockets on my server. It will be nice to share with you.

Steps

Step1 - Laravel Websockets Installation with composer

Laravel WebSockets can be installed via composer:

@pherum
pherum / ModelResource.php
Created December 26, 2021 17:17 — forked from bezhanSalleh/ModelResource.php
Filament Dynamic UI for Role and Permissions | Toggel + Checkboxes
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\Grid::make()
->schema([
Forms\Components\Card::make()
->schema([
Forms\Components\TextInput::make('name')
->required()
@pherum
pherum / form.html
Created June 2, 2021 09:40 — forked from runspired/form.html
How to turn off password and email/username autocomplete.
<!--
<form autocomplete="off"> will turn off autocomplete for the form in most browsers
except for username/email/password fields
-->
<form autocomplete="off">
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields -->
<input id="username" style="display:none" type="text" name="fakeusernameremembered">
<input id="password" style="display:none" type="password" name="fakepasswordremembered">
import React from 'react'
import ReactDOM from 'react-dom'
import singleSpaReact from 'single-spa-react'
import { property } from 'lodash'
import setPublicPath from './set-public-path.js'
const reactLifecycles = singleSpaReact({
React,
ReactDOM,
loadRootComponent: () => import(/* webpackChunkName: "react-app" */'./App.js').then(property('default')),
@pherum
pherum / metrials-go.md
Created May 11, 2020 13:33 — forked from egorsmkv/metrials-go.md
Материалы по Go (golang): мануалы, статьи, книги и ссылки на сообщества

Материалы по Go (golang)

На русском языке

Мануалы и туториалы

  • [Введение в программирование на Go][1]
  • [Маленькая книга о Go][3]
  • [Эффективный Go][2]
  • Есть еще [Краткий пересказ Effective Go на русском языке][4], но 2009 года
@pherum
pherum / Dockerfile
Created October 3, 2019 10:38 — forked from njxqlus/Dockerfile
PHP + Oracle instantclient dockerfile
FROM php:fpm
# Install packages
RUN apt-get update
RUN apt-get install -y unzip
RUN apt-get install -y libaio1
# Oracle instantclient
ADD instantclient-basic-linux.x64-11.2.0.4.0.zip /tmp/
ADD instantclient-sdk-linux.x64-11.2.0.4.0.zip /tmp/
@pherum
pherum / macosx-install-php-oracle-oci8-pdo_oci.md
Created October 2, 2019 07:29 — forked from alexbonhomme/macosx-install-php-oracle-oci8-pdo_oci.md
Install OCI8 and / or PDO_OCI on OSX via Brew