Skip to content

Instantly share code, notes, and snippets.

View diegobenedicto's full-sized avatar
:octocat:

Diego Benedicto diegobenedicto

:octocat:
View GitHub Profile
@henriquemenezes
henriquemenezes / postgresql-set-id-seq.sql
Created March 31, 2016 12:23
PostgreSQL set Next ID Sequence Value to MAX(id) from Table
-- Get Max ID from table
SELECT MAX(id) FROM table;
-- Get Next ID from table
SELECT nextval('table_id_seq');
-- Set Next ID Value to MAX ID
SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));
@jctosta
jctosta / screen_cheatsheet.markdown
Last active June 12, 2024 16:53
Screen Cheatsheet

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@ahabra
ahabra / chromeMemory.txt
Created August 12, 2012 07:06
Google Chrome Tips to inspect memory
Tips to inspect memory usage in Chrome
1. Tools/Task Manager:
In the table header, select context menu (right click)
Select JavaScript Memory
Now the table will show how much memory is used by every Chrome tab.
2. Inspect JavaScript heap memory usage
Start Chrome from the command line with this argument: --enable-memory-info
For example on a Mac, it could be: