Skip to content

Instantly share code, notes, and snippets.

@cladley
cladley / accordion.js
Created April 26, 2019 10:35
Accordion using react hooks
import React, {forwardRef, useRef, useImperativeHandle, useState, useCallback, useMemo} from 'react';
const Accordion = (props) => {
let items = useRef(new Map()).current;
const handleOnToggle = (id) => {
items.forEach((value, key) => {
if (key != id) {
value.close();
}
@ankurk91
ankurk91 / xdebug-mac.md
Last active March 9, 2024 22:20
php xDebug v3 on Ubuntu/Mac and phpStorm

🪲 Install and Configure xDebug v3 on MacOS for PhpStorm 🐘

  • Assuming that you have already installed php and apache via Homebrew

  • Install xDebug php extension

pecl channel-update pecl.php.net
pecl clear-cache

pecl install xdebug
@drorm
drorm / proxy.js
Created December 4, 2012 20:07
Meteor Proxy server
"use strict";
var httpProxy = require('http-proxy'),
http = require('http'),
accesslog = require('access-log'),
addresses;
var LISTENPORT = 80; //port we're listening to the outside world
var METEORPORT = 3000; //port meteor is run on the guests
var MINIP = 10; //Minimum IP address we can use. Smaller numbers are for admin purposes