Skip to content

Instantly share code, notes, and snippets.

View Gekkio's full-sized avatar

Joonas Javanainen Gekkio

View GitHub Profile
use http_req::{request, response::StatusCode};
use std::{
collections::HashMap,
env,
ffi::OsStr,
fs::{self, File},
io::{self, BufReader, BufWriter, Write},
path::PathBuf,
};
use zip::ZipArchive;
@Gekkio
Gekkio / all_row_counts.sql
Last active February 26, 2020 13:20
List accurate row counts for all tables in a PostgreSQL database
DO $$
DECLARE
schema text;
tbl text;
rows integer;
BEGIN
FOR schema, tbl IN
SELECT schemaname, tablename
FROM pg_tables
WHERE schemaname NOT IN ('pg_catalog', 'information_schema')
(skip-clock-edges 13) ; align to the start of the LCDC write M-cycle
(step-clock-edges 32)
(assert-edges 27 :stat 0x84 :ly 0x00 :vsync false :hsync false :cpg false :cpl false :fr true)
; this is 55 edges after the write
(assert-edges 8 :stat 0x84 :ly 0x00 :vsync false :hsync false :cpg true :cpl false :fr true)
(assert-edges 94 :stat 0x84 :ly 0x00 :vsync false :hsync false :cpg false :cpl false :fr true)
(assert-edges 29 :stat 0x87 :ly 0x00 :vsync false :hsync true :cpg false :cpl false :fr true)
(assert-edges 173 :stat 0x87 :ly 0x00 :vsync false :hsync false :cpg false :cpl false :fr true)
(assert-edges 8 :stat 0x87 :ly 0x00 :vsync false :hsync false :cpg true :cpl false :fr true)
Copyright (C) 2017 Joonas Javanainen <[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:
;
; The above copyright notice and this permission notice shall be included in
vsync fr cpl hsync cp cpg ld mdata mwr mrd mcs maddr sout sin sclk p1 addr data wr rd cs phi t2 t1 res clk
0 0 0 0 0 0 00 ff 1 0 1 0000 0 1 1 001111 ff50 ff 1 0 1 1 0 0 1 1
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 8100 ff 1 0 1 1 0 0 1 0
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 1 0 0 1 1
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 1 0 0 1 0
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 0 0 0 1 1
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 0 0 0 1 0
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 0 0 0 1 1
0 0 0 0 0 0 00 ff 1 0 1 0100 0 1 1 001111 0100 00 1 0 1 0 0 0 1 0
0 0 0 0 0 0 00 ff 1 0 1 0000 0 1 1 001111 8000 ff 1 0 1 1 0 0 1 1
(function() {
var result = [];
function isProblematic(style) {
if (style.overflow !== 'visible') {
if (style.borderTopLeftRadius !== '0px' || style.borderTopRightRadius !== '0px') {
return true;
}
if (style.borderBottomLeftRadius !== '0px' || style.borderBottomRightRadius !== '0px') {
return true;
}
curl -sSL https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '("# syncToken: " + .syncToken), ("# createDate: " + .createDate), (.prefixes | .[] | select(.service == "CLOUDFRONT") | "set_real_ip_from " + .ip_prefix + ";")'
import * as React from 'react'
import * as ReactDOM from 'react-dom'
ReactDOM.render(null, null)
[ignore]
[include]
[libs]
[options]
@Gekkio
Gekkio / main.ts
Created July 18, 2016 17:42
Typescript issue #9785
import * as path from 'path';
console.info(path.delimiter);