Skip to content

Instantly share code, notes, and snippets.

View jkstill's full-sized avatar
🏠
Working from home

Jared jkstill

🏠
Working from home
View GitHub Profile
@jkstill
jkstill / gist:f731aa7eed90be2a9cda0d1bf47170ee
Created February 21, 2024 00:44
custom ad block hosts file for dnsmasq
#!/usr/bin/env bash
set -eu
echo
echo Pulling latest Steven Black hosts file
echo
# curl and openssl built
# openssl /usr/local/ssl
@jkstill
jkstill / pt-check.c
Created October 4, 2023 00:32 — forked from carter-yagemann/pt-check.c
Quick and dirty check for Intel Processor Trace (PT) features.
/*
* Copyright 2019 Carter Yagemann <[email protected]>
*
* 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 copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
-- showlock.sql - show all user locks
--
-- see ML Note 1020008.6 for fully decoded locking script
-- parts of the that script to not work correctly, but the
-- lock types are current
-- (script doesn't find object that is locked )
--
-- speeded up greatly by changing order of where clause,
-- jks 04/09/1997 - show lock addresses and lockwait
@jkstill
jkstill / c2.sql
Created March 26, 2016 18:42
Test table for Timestamp Math Blog
col c1_dump format a70
col c1 format a35
col funcname format a15
set linesize 200 trimspool on
set pagesize 60
drop table timestamp_test purge;
@jkstill
jkstill / 0_reuse_code.js
Created March 26, 2016 18:34
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

Keybase proof

I hereby claim:

  • I am jkstill on github.
  • I am jkstill (https://keybase.io/jkstill) on keybase.
  • I have a public key whose fingerprint is D2D8 E718 7020 EDB6 B4F6 1277 B515 2F65 4FFC 2016

To claim this, I am signing this object:

1 with mydata as (
2 select level id
3 from dual connect by level <= 10
4 )
5 select id from mydata
6* having id between 5 and 8
09:27:05 ora112304a.jks.com - jkstill@js02 SQL> /
having id between 5 and 8
*
ERROR at line 6:
@jkstill
jkstill / proc_net_tcp_decode
Last active August 31, 2024 11:32
decode entries in /proc/net/tcp
Decoding the data in /proc/net/tcp:
Linux 5.x /proc/net/tcp
Linux 6.x /proc/PID/net/tcp
Given a socket:
$ ls -l /proc/24784/fd/11
lrwx------ 1 jkstill dba 64 Dec 4 16:22 /proc/24784/fd/11 -> socket:[15907701]
-- showdf.sql
-- get from dba_data_files and dba_temp_files rather that v$ views
-- jkstill - 10/29/2008 - changed method of getting free TEMP space
-- it was incorrect. currently still a compromise, but more correct
-- added pct_capacity
-- jkstill - 10/29/2008
-- 2 calculations had '/' on a line by itself
-- works in 9i, but not in 10g.
:
function usage {
echo $0
echo
echo -m info:oratab
echo
echo Get a report on missing oratab entries
echo $0 -m info
echo