Skip to content

Instantly share code, notes, and snippets.

@songpp
songpp / regular_expression_engine_comparison.md
Created February 11, 2023 12:21 — forked from CMCDragonkai/regular_expression_engine_comparison.md
Regular Expression Engine Comparison Chart

Regular Expression Engine Comparison Chart

Many different applications claim to support regular expressions. But what does that even mean?

Well there are lots of different regular expression engines, and they all have different feature sets and different time-space efficiencies.

The information here is just copied from: http://regular-expressions.mobi/refflavors.html

@songpp
songpp / gist:5d98773ddb002a216bdc7bf6d7fd2e76
Created July 12, 2020 16:30 — forked from patshaughnessy/gist:70519495343412504686
How to Debug Postgres using LLDB on a Mac
This note explains how to build Postgres from source and setup to debug it using LLDB on a Mac. I used this technique to research this article:
http://patshaughnessy.net/2014/10/13/following-a-select-statement-through-postgres-internals
1. Shut down existing postgres if necessary - you don’t want to mess up your existing DB or work :)
$ ps aux | grep postgres
pat 456 0.0 0.0 2503812 828 ?? Ss Sun10AM 0:11.59 postgres: stats collector process
pat 455 0.0 0.0 2649692 2536 ?? Ss Sun10AM 0:05.00 postgres: autovacuum launcher process
pat 454 0.0 0.0 2640476 304 ?? Ss Sun10AM 0:00.74 postgres: wal writer process
pat 453 0.0 0.0 2640476 336 ?? Ss Sun10AM 0:00.76 postgres: writer process
@songpp
songpp / Sublime Text 3 Build 3103 License Key - CRACK
Created June 26, 2016 17:41
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@songpp
songpp / introrx.md
Created June 26, 2016 17:40 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@songpp
songpp / The Technical Interview Cheat Sheet.md
Created June 26, 2016 17:34 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
#!/bin/bash
#
# git-svn-diff originally by (http://mojodna.net/2009/02/24/my-work-git-workflow.html)
# modified by mike@mikepearce.net
# modified by aconway@[redacted] - handle diffs that introduce new files
# modified by t.broyer@ltgt.net - fixes diffs that introduce new files
# modified by m@rkj.me - fix sed syntax issue in OS X
# modified by songpengpeng - fix sed newline issue in OS X
#
# Generate an SVN-compatible diff against the tip of the tracking branch
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overriden in the platform
// specific settings file, for example, "Base File (Linux).sublime-settings".
// Because of this, setting them here will have no effect: you must set them
// in your User File Preferences.
"font_face": "Monaco",
"font_size": 12,
import sbt._
import Keys._
import org.sbtidea._
import SbtIdeaPlugin._
import Scope.{GlobalScope, ThisScope}
object BuildSettings {
val buildOrganization = "com.mojolly.backchat"
val buildScalaVersion = "2.9.0-1"
val buildVersion = "0.8.1-SNAPSHOT"
package com.baidu.cms.thirtpart
import util.parsing.combinator.JavaTokenParsers
import java.io.FileReader
import java.util.regex.Pattern
import com.baidu.cms.thirtpart.TransferRuleContext._
import com.baidu.cms.thirtpart.TransferRuleContext.ActivityRef
import com.baidu.cms.thirtpart.TransferRuleContext.FieldValueFilter
import com.baidu.cms.thirtpart.TransferRuleContext.Rule
import com.baidu.cms.thirtpart.TransferRuleContext.OperatorFetchStrategy
import scala.collection.JavaConversions._
// requires Scala 2.10.0-M7
def kind[A: scala.reflect.TypeTag]: String = {
import scala.reflect.runtime.universe._
def typeKind(sig: Type): String = sig match {
case PolyType(params, resultType) =>
(params map { p =>
typeKind(p.typeSignature) match {
case "*" => "*"
case s => "(" + s + ")"
}