Skip to content

Instantly share code, notes, and snippets.

@Grin941
Grin941 / Vagrantfile
Last active March 15, 2019 12:53
Standard Vagrant VM
# -*- mode: ruby -*-
# vi: set ft=ruby :
hosts = {
"grin941JobApi" => "192.168.33.16",
"grin941Server" => "192.168.33.15"
}
Vagrant.configure("2") do |config|
hosts.each do |name, ip|
@Grin941
Grin941 / d+_query.sql
Last active October 15, 2018 15:09
Postgres tricks
-- run psql -E -> so every command will print related queries**
-- Get table pg_class.id
SELECT c.oid,
n.nspname,
c.relname
FROM pg_catalog.pg_class c
LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace
WHERE c.relname ~ '^(YOUR_TABLE_NAME)$'
AND pg_catalog.pg_table_is_visible(c.oid)
@Grin941
Grin941 / bandit.md
Last active January 20, 2021 15:45
Bandit game challenge

Bandit wargame

Level 0 -> Level 1

The password for the next level is stored in a file called readme located in the home directory.

$  ssh [email protected] -p 2220
$  cat readme

CPU info: less /proc/cpuinfo

RAM info: free -mh

@Grin941
Grin941 / markdown_syntax.md
Last active April 2, 2018 09:04
See how to apply markdown syntax

Markdown syntax

Header

Unordered list

  • Item 1
  • Item 2
    • Item 2.1
    • Item 2.2