Skip to content

Instantly share code, notes, and snippets.

@jirutka
jirutka / -README.md
Last active October 31, 2023 09:07
How to use terminal on Windows and don’t go crazy…

How to use terminal on Windows without going crazy…

Windows is really horrible system for developers and especially for devops. It doesn’t even have a usable terminal and shell, so working with command line is really pain in the ass. If you really don’t want to switch to any usable system (OS X, Linux, BSD…), then this guide should help you to setup somewhat reasonable environment – usable terminal, proper shell, ssh client, git and Sublime Text as a default editor for shell.

Install stuff

  1. Download and install Git for Windows* with:
    • [✘] Use Git from the Windows Command Prompt
  • [✘] Checkout as-is, commit Unix-style line endings
@Kartones
Kartones / postgres-cheatsheet.md
Last active May 3, 2024 20:51
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@gxgani
gxgani / SpeedTest.Net Server List
Created April 29, 2014 14:23
Speedtest.net Server List
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<servers><server url="http://speedtest.pronea.no/speedtest/upload.php" lat="69.6828" lon="18.9428" name="Tromso" country="Norway" countrycode="NO" sponsor="Pronea AS" sponsorurl="http://www.pronea.no/" id="1327" gid="0" url2="http://speedtest.pronea.no/speedtest/upload.php" bigsamples="1" />
<server url="http://speedtest.mmsn.ru/speedtest/upload.php" lat="68.9667" lon="33.0833" name="Murmansk" country="Russian Federation" countrycode="RU" sponsor="JSC M2C" sponsorurl="http://www.mmsn.ru" id="1521" gid="0" url2="http://speedtest.mmsn.ru/speedtest/upload.php" bigsamples="1" />
<server url="http://st1.teletoria.ru/speedtest/upload.php" lat="68.9667" lon="33.0833" name="Murmansk" country="Russian Federation" countrycode="RU" sponsor="ISP Teletoria" sponsorurl="http://www.teletoria.ru" id="2342" gid="0" url2="http://st1.teletoria.ru/speedtest/upload.php" bigsamples="1" />
<server url="http://speedtest.oltv.ru/speedtest/upload.php" lat="68.1500" lon="33.2833" nam
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 6, 2024 12:37
Useful PostgreSQL Queries and Commands
-- 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%'