Skip to content

Instantly share code, notes, and snippets.

View greeno's full-sized avatar

Chris Greenough greeno

View GitHub Profile
@greeno
greeno / example.tsv
Last active October 16, 2019 17:25 — forked from rain-1/example.tsv
Tab Separated Values file format specification version 2.0
Name Age Address Text
Paul 23 1115 W Franklin This is a an \n escaped new line
Bessy the Cow 5 Big Farm Way This is an \t escaped tab
Zeke 45 W Main St This is an \uXXXX escaped unicode char

Keybase proof

I hereby claim:

  • I am greeno on github.
  • I am greenoch (https://keybase.io/greenoch) on keybase.
  • I have a public key ASAAAXN-4cLc-57Y-SPW7Vm0k2JMWdOPWJFCfe-RtChNxwo

To claim this, I am signing this object:

@greeno
greeno / list_tables.sql
Created July 18, 2019 20:56
This query returns list of tables in a database with their number of rows.
select tab.table_schema,
tab.table_name,
tinf.tbl_rows as rows
from svv_tables tab
join svv_table_info tinf
on tab.table_schema = tinf.schema
and tab.table_name = tinf.table
where tab.table_type = 'BASE TABLE'
and tab.table_schema in('src_canvas')
and tinf.tbl_rows > 1
@greeno
greeno / list_tables.sql
Created July 18, 2019 20:56
This query returns list of tables in a database with their number of rows.
select tab.table_schema,
tab.table_name,
tinf.tbl_rows as rows
from svv_tables tab
join svv_table_info tinf
on tab.table_schema = tinf.schema
and tab.table_name = tinf.table
where tab.table_type = 'BASE TABLE'
and tab.table_schema in('src_canvas')
and tinf.tbl_rows > 1
@greeno
greeno / list_tables.sql
Created July 18, 2019 20:56
This query returns list of tables in a database with their number of rows.
select tab.table_schema,
tab.table_name,
tinf.tbl_rows as rows
from svv_tables tab
join svv_table_info tinf
on tab.table_schema = tinf.schema
and tab.table_name = tinf.table
where tab.table_type = 'BASE TABLE'
and tab.table_schema in('src_canvas')
and tinf.tbl_rows > 1
@greeno
greeno / list_tables.sql
Created July 18, 2019 20:56
This query returns list of tables in a database with their number of rows.
select tab.table_schema,
tab.table_name,
tinf.tbl_rows as rows
from svv_tables tab
join svv_table_info tinf
on tab.table_schema = tinf.schema
and tab.table_name = tinf.table
where tab.table_type = 'BASE TABLE'
and tab.table_schema in('src_canvas')
and tinf.tbl_rows > 1
@greeno
greeno / gist:5725631
Created June 6, 2013 22:49
Do you have user accounts automatically created in Confluence? Do most of these users never create content? Are you close to your Confluence license? Then this script is for you! It really just tries to remove EVERYONE from Confluence. The good part is that it fails if the user has content. So it will just remove the readers which is a good thin…
import xmlrpclib
url = "https://your-confluence.awhere"
s = xmlrpclib.ServerProxy(url + "/rpc/xmlrpc")
print "Logging in..."
token = s.confluence2.login("username","*****")
if not token:
print "No Token!!"
@greeno
greeno / gist:5541707
Created May 8, 2013 16:36
Mobile Device Page Redirection
<!-- Normal Non-Mobile Page -->
...
<script src="../js/cookie.js"></script>
...
$(function(){
console.log($(window).width());
console.log(readCookie("forceStandardView"));
// 1024 is a random choice. What should it be? Should iPad use mobile view? Only 480<?
// Research width. Does device-width == window.width? Or at least close?
if($(window).width() < 1024 && readCookie("forceStandardView")!="yes"){