Skip to content

Instantly share code, notes, and snippets.

View Magomogo's full-sized avatar
🎯
Focusing

Maxim Gnatenko Magomogo

🎯
Focusing
View GitHub Profile
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@mylk
mylk / xvfb.service
Created August 16, 2016 14:15
Xvfb systemd script
# /etc/systemd/system/xvfb.service
[Unit]
Description=X virtual framebuffer
[Service]
Type=simple
User=root
ExecStart=/usr/bin/Xvfb :99 -ac
@anvk
anvk / psql_useful_stat_queries.sql
Last active October 18, 2024 23:47
List of some useful Stat Queries for PSQL
--- PSQL queries which also duplicated from https://github.com/anvk/AwesomePSQLList/blob/master/README.md
--- some of them taken from https://www.slideshare.net/alexeylesovsky/deep-dive-into-postgresql-statistics-54594192
-- I'm not an expert in PSQL. Just a developer who is trying to accumulate useful stat queries which could potentially explain problems in your Postgres DB.
------------
-- Basics --
------------
-- Get indexes of tables