Skip to content

Instantly share code, notes, and snippets.

@bmaupin
bmaupin / free-database-hosting.md
Last active November 19, 2024 09:05
Free database hosting
@piyusht007
piyusht007 / BaseQueryValidator.java
Last active July 9, 2024 10:58
SQL parsing in java using Apache-Calcite SQL parser.
public class BaseQueryValidator {
private static List<String> extractTableAliases(SqlNode node) {
final List<String> tables = new ArrayList<>();
// If order by comes in the query.
if (node.getKind().equals(SqlKind.ORDER_BY)) {
// Retrieve exact select.
node = ((SqlSelect) ((SqlOrderBy) node).query).getFrom();
} else {
node = ((SqlSelect) node).getFrom();
@brson
brson / gist:9dec4195a88066fa42e6
Last active August 15, 2024 16:09
A Rust Syntax Guide

A Guide to Rust Syntax

A very brief guide to Rust syntax. It assumes you are already familiar with programming concepts.

This was written in 2014. It is not a good reference for Rust today, though the content is still correct.

cheats.rs looks like a good alternative.

Assert macro

@okaram
okaram / blogroll.py
Created November 16, 2012 01:27
Python Blogroll
import feedparser
f=open('blogroll.html','w')
f.write("<html>\n<head>\n<title>Blogroll</title>\n</head>\n<body>");
blogs=["http://programminggenin.blogspot.com/feeds/posts/default","http://djangolearner.blogspot.com/feeds/posts/default"];
for blog in blogs :
feed=feedparser.parse(blog)
f.write('<a href="%s">%s</a>\n'% (feed.feed.link,feed.feed.title));
f.write('<ul>\n');
for e in feed.entries:
@bhenerey
bhenerey / ideal ops.md
Created May 23, 2012 19:40
ideal ops checklist

In a perfect world, where things are done well, not just quickly, I would expect to find the following when joining the company:

Documentation

  • Accurate / up-to-date systems architecture diagram

  • Accurate / up-to-date network diagram

  • Out-of-hours support plan

  • Incident management plan