Skip to content

Instantly share code, notes, and snippets.

@thomasfr
thomasfr / autossh.service
Last active June 19, 2025 05:38
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@kdabir
kdabir / mac_setup.md
Last active November 24, 2022 21:39
Clean Setup on Mac

Cleaning up the mac

Before formatting/wiping out all the data

@katjunior
katjunior / oracle_sql_text_spid.sql
Created September 18, 2013 16:00
Oracle - Select Sql Text from System Process ID
select s.sql_text,s.sql_fulltext from v$sql s
where sql_id in (SELECT A.SQL_ID FROM V$SESSION A,V$PROCESS B
WHERE A.PADDR=B.ADDR AND B.SPID='6495')
@mocchira
mocchira / curl_range.md
Last active February 17, 2025 22:25
HTTP GET with Range header by curl
  • normal(explicitly specified start AND end)
  curl -v -X GET -H "range: bytes=1-8" http://localhost:8080/bbb/test
  • specified ONLY start(end will be specified at the end of file)
  curl -v -X GET -H "range: bytes=10-" http://localhost:8080/bbb/test
  • specified ONLY one negative value(last N bytes of file will be retrieved)