Initializing Empty Structs in Rust
In C/C++, you can initialise a struct without giving values for any of the fields:
struct Point {
float x;
float y;
float z;
};
/* | |
COLORS | |
Better default colors for the web | |
*/ | |
/* | |
VARIABLES |
In C/C++, you can initialise a struct without giving values for any of the fields:
struct Point {
float x;
float y;
float z;
};
127.0.0.1 localhost | |
127.0.0.1 localhost.localdomain | |
127.0.0.1 local | |
255.255.255.255 broadcasthost | |
::1 localhost | |
::1 ip6-localhost | |
::1 ip6-loopback | |
fe80::1%lo0 localhost | |
ff00::0 ip6-localnet | |
ff00::0 ip6-mcastprefix |
#!/bin/sh | |
# | |
# The MIT License | |
# | |
# Copyright 2014-2017 Jakub Jirutka <jakub@jirutka.cz>. | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
-- show running queries (pre 9.2) | |
SELECT procpid, age(query_start, clock_timestamp()), 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(query_start, clock_timestamp()), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
):
-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)04d4dbb7d597566748e73f79c76aff1b58ac727b35c6feaea0d90b21b115783525007b5224e46e08dadfaa52b9c76dd9fbbc47278482880b7c82b0a54b54b643e2 |
Standups: | |
2-3 times per night | |
post issues to Slack | |
designate scrum master and rotate who the master will be | |
scrum master gives everyone a turn to speak | |
Conflicts: | |
Write down your conflict | |
Spend 15 minutes tops to resolve the conflict and move on. | |
We are all on the same team with the same goal |
Please replace the screen, then ship to the address on the work order.
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |