Skip to content

Instantly share code, notes, and snippets.

View HELWATANY's full-sized avatar
🧐
A Problem Well-Defined is a Problem Half-Solved!

Haithm EL-Watany HELWATANY

🧐
A Problem Well-Defined is a Problem Half-Solved!
View GitHub Profile
@atinux
atinux / sse.ts
Last active February 1, 2025 19:02
SSE endpoint example with Nuxt 3
// ~/server/api/sse.ts
export default defineEventHandler(async (event) => {
if (!process.dev) return { disabled: true }
// Enable SSE endpoint
setHeader(event, 'cache-control', 'no-cache')
setHeader(event, 'connection', 'keep-alive')
setHeader(event, 'content-type', 'text/event-stream')
setResponseStatus(event, 200)
@HELWATANY
HELWATANY / Webstorm64.vmoptions
Last active March 7, 2025 08:53
JetBrains Custom VM Options Configuration Optimized For High Performance... Works with all JetBrains IDEs... JDK 8.x+ Recommended....
# Make sure to modify "-Xms", "Xmx", "CICompilerCount", and "ParallelGCThreads" according to your PC hardware configuration...
#####################
# Default VM Options
#####################
# default value is 128m
-Xms1024m
# default value is 750m
-Xmx4096m
# default value is 512m
@ScriptedAlchemy
ScriptedAlchemy / idea.vmoptions
Created November 26, 2019 22:23
improved perf vmoptions
-Xms1024m
-Xmx3072m
-Xss64m
-XX:ReservedCodeCacheSize=512m
-XX:+UseCompressedOops
-XX:NewRatio=2
-Dfile.encoding=UTF-8
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=250
-XX:NewSize=512m
@ScriptedAlchemy
ScriptedAlchemy / idea.propertie
Last active October 21, 2023 23:21
custom IntelliJ IDEA properties
# custom IntelliJ IDEA properties
editor.zero.latency.typing=true
idea.max.intellisense.filesize=3500
idea.cycle.buffer.size=2048
@thehandsomezebra
thehandsomezebra / index.html
Last active January 15, 2024 10:57
JS Drag and Drop 2 file count
<div id="dropzone" effectAllowed="move">Drop files here!</div>
<ul id="items"></ul>
@h4cc
h4cc / Makefile
Last active July 11, 2021 10:32
Ubuntu 18.04 Bionic Beaver - Basic packages i usually install
#
# Ubuntu 18.04 (Bionic Beaver)
#
# Basic packages i usually install.
#
# Author: Julius Beckmann <[email protected]>
#
# Upgraded Script from 17.04: https://gist.github.com/h4cc/09b7fe843bb737c8039ac62d831f244e
# Upgraded Script from 16.04: https://gist.github.com/h4cc/fe48ed9d85bfff3008704919062f5c9b
##
## How to install mcrypt in php7.2 / php7.3
## Linux / MacOS / OSX
##
## https://lukasmestan.com/install-mcrypt-extension-in-php7-2/
#
@DawidMyslak
DawidMyslak / vue.md
Last active April 22, 2024 12:49
Vue.js and Vuex - best practices for managing your state

Vue.js and Vuex - best practices for managing your state

Modifying state object

Example

If you have to extend an existing object with additional property, always prefer Vue.set() over Object.assign() (or spread operator).

Example below explains implications for different implementations.

@ipbastola
ipbastola / clean-up-boot-partition-ubuntu.md
Last active August 16, 2024 13:39
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@luetkemj
luetkemj / wp-query-ref.php
Last active February 3, 2025 10:58
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/