Skip to content

Instantly share code, notes, and snippets.


petru ramzes13

  • chisinau
View GitHub Profile
odeke-em / marshalJSON_unmarshalJSON.go
Last active December 30, 2022 10:44
Example on custom UnmarshalJSON and MarshalJSON
View marshalJSON_unmarshalJSON.go
package main
import (
jehaby /
Last active October 5, 2022 23:42 — forked from chadrien/
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name" > /usr/local/etc/php/conf.d/xdebug.ini \
mitchwongho / Docker
Last active March 6, 2023 18:13
Docker 'run' command to start an interactive BaSH session
View Docker
# Assuming an Ubuntu Docker image
$ docker run -it <image> /bin/bash
reu / pub-sub.js
Created April 9, 2013 01:51
node.js redis pub-sub example
View pub-sub.js
var redis = require("redis")
, subscriber = redis.createClient()
, publisher = redis.createClient();
subscriber.on("message", function(channel, message) {
console.log("Message '" + message + "' on channel '" + channel + "' arrived!")
rgreenjr / postgres_queries_and_commands.sql
Last active May 28, 2023 09:46
Useful PostgreSQL Queries and Commands
View postgres_queries_and_commands.sql
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'