Skip to content

Instantly share code, notes, and snippets.

View rajitha-bandara's full-sized avatar

Rajitha Bandara rajitha-bandara

View GitHub Profile
## Step 1
Open C:\Windows\System32\drivers\etc\hosts
## Step 2
Add 1.2.3.4 account.jetbrains.com
## Step 3
Add this key to Phpstorm
``1W61R3J3UL-eyJsaWNlbnNlSWQiOiIxVzYxUjNKM1VMIiwibGljZW5zZWVOYW1lIjoi5r+A5rS75p2l5rqQIHd3d8K3YWppaHVvwrdjb20iLCJhc3NpZ25lZU5hbWUiOiIiLCJhc3NpZ25lZUVtYWlsIjoiIiwibGljZW5zZVJlc3RyaWN0aW9uIjoiIiwiY2hlY2tDb25jdXJyZW50VXNlIjpmYWxzZSwicHJvZHVjdHMiOlt7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAyMS0wOC0xMSJ9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJSU0MiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJHTyIsInBhaWRVcFRvIjoiMjAyMS0wOC0xMSJ9LHsiY29kZSI6IkRNIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiUEMiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJSQyIsInBhaWRVcFRvIjoiMjAyMS0wOC0xMSJ9LHsiY29kZSI6IkNMIiwicGFpZFVwVG8iOiIyMDIxLTA4LTExIn0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMjEtMDgtMTEifSx7ImNvZGUiOiJSRCIsInBhaWR
@Gyvastis
Gyvastis / phpstorm_evaluation_license_reset.md
Last active May 3, 2024 23:57
PhpStorm reset evaluation license/period

PhpStorm reset evaluation license/period

Make sure to export/import your settings through File -> Manage IDE settings before/after

Windows 10

  1. Close PHPStorm
  2. Run these in PowerShell to remove PhpStorm configuration:
Remove-Item '.\AppData\Local\Jetbrains\PhpStorm*'
Remove-Item '.\AppData\Roaming\Jetbrains\PhpStorm*'
@frozenex
frozenex / bulk-convert.ps1
Last active January 14, 2024 02:04
Bulk convert images to webp format using cwebp library in windows
# Copy this file to any directory containing images & then run this script in powershell
# Get all png images in the current directory & convert it to webp format
$images = Get-ChildItem -Path (Get-Location) -Filter *.png
foreach ($image in $images) {
$fileName = $image.DirectoryName + "\" + $image.BaseName + ".webp"
cwebp.exe -q 80 $image.FullName -o $fileName
}
@yhatt
yhatt / marp.md
Last active April 22, 2024 17:00
Marp Next example
marp

Marp

h:250

Markdown presentation ecosystem
@rylev
rylev / learn.md
Created March 5, 2019 10:50
How to Learn Rust

Learning Rust

The following is a list of resources for learning Rust as well as tips and tricks for learning the language faster.

Warning

Rust is not C or C++ so the way your accustomed to do things in those languages might not work in Rust. The best way to learn Rust is to embrace its best practices and see where that takes you.

The generally recommended path is to start by reading the books, and doing small coding exercises until the rules around borrow checking become intuitive. Once this happens, then you can expand to more real world projects. If you find yourself struggling hard with the borrow checker, seek help. It very well could be that you're trying to solve your problem in a way that goes against how Rust wants you to work.

@Moutard3
Moutard3 / mp3-upload-direct-link.md
Last active April 15, 2024 07:06
Tutorials / Walkthrough for uploading & getting direct link of sound file (mp3, ogg, ...)
@jnbn
jnbn / controller.php
Last active May 28, 2023 08:37
Replicate (Duplicate) Eloquent Model With Relations
<?php
public function replicateWithRelations(QuestionCategory $questioncategory)
{
$newCategory = $questioncategory->replicate();
$newCategory->name = "Kopyası: ".$questioncategory->name;
$newCategory->push();
$questioncategory->relations = [];
//load relations on EXISTING MODEL
@justincbagley
justincbagley / How_to_Convert_Markdown_to_PDF.md
Last active April 28, 2024 22:28
How To Convert Markdown to PDF

How to convert markdown to PDF:

This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.

Using Pandoc:

$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
@FilipQL
FilipQL / CommentController.php
Created October 10, 2016 18:51
Infinite Scroll Pagination Using Laravel & jScroll
<?php
// For more details see: http://laraget.com/blog/implementing-infinite-scroll-pagination-using-laravel-and-jscroll
namespace App\Http\Controllers\InfiniteScrolling;
use App\Comment;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
@bwbaugh
bwbaugh / ec2-ubuntu-16.04-swap.md
Last active September 27, 2019 06:27
EC2 swap file instructions. Gathered from several online articles / blogs / stackexchange.

Can check if you're using swap with sudo swapon --show and free -h.

EBS volume

Useful for t2.micro and other instances with no access to instance store. Use this if you prefer not to mess with the root volume.

  1. Create the EBS volume e.g., 1 GB.