Skip to content

Instantly share code, notes, and snippets.

View ciruz's full-sized avatar
🔥
on fire

Tom ciruz

🔥
on fire
View GitHub Profile
@reecelucas
reecelucas / useScrollBlock.js
Last active April 7, 2026 13:18
React hook to enable/disable page scroll
import { useRef } from 'react';
const safeDocument = typeof document !== 'undefined' ? document : {};
/**
* Usage:
* const [blockScroll, allowScroll] = useScrollBlock();
*/
export default () => {
const scrollBlocked = useRef();
@tkrotoff
tkrotoff / FrontendFrameworksPopularity.md
Last active June 12, 2026 20:28
Front-end frameworks popularity (React, Vue, Angular and Svelte)
@ismyrnow
ismyrnow / mac-clear-icon-cache.sh
Created May 5, 2017 19:28
Clear the icon cache on a Mac when you start seeing generic icons in Finder or the Dock
sudo rm -rfv /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Todo;
class TodosController extends Controller
{
@parmentf
parmentf / GitCommitEmoji.md
Last active June 9, 2026 22:29
Git Commit message Emoji
@nunoveloso
nunoveloso / nuno_php_array_ops.php
Created March 7, 2012 12:34
PHP array operations up to 10x faster than the original
/**
* Home mande method to do array_diff ~10x faster that PHP built-in.
*
* @param The array to compare from
* @param An array to compare against
*
* @return an array containing all the entries from array1 that are not present in array2.
*/
function nuno_array_diff($array1, $array2) {
$diff = array();