Skip to content

Instantly share code, notes, and snippets.

'use strict';
var bracketMapKey = Symbol('bracketMapKey');
Object.prototype[Symbol.toPrimitive] = function () {
return this[bracketMapKey] || (this[bracketMapKey] = Symbol());
};
var map = {};
var key = ['some object'];
test=> CREATE TABLE points (id serial PRIMARY KEY, p point NOT NULL);
CREATE TABLE
test=> CREATE INDEX ON points USING GIST (p);
CREATE INDEX
test=> INSERT INTO points (p) VALUES ('1,1'), ('1,0'), ('0,1'), ('0,0.5'), ('0,2');
INSERT 0 5
test=> SELECT * FROM points ORDER BY p <-> '0,0' LIMIT 3;
id | p
----+---------
#include <iostream>
#include <chrono>
#include <list>
#include <map>
extern "C" {
#include <arpa/inet.h>
#include <sys/socket.h>
#include <unistd.h>
}
@charmander
charmander / Liberal Regex Pattern for Web URLs
Last active May 17, 2016 20:03 — forked from gruber/Liberal Regex Pattern for Web URLs
Liberal, Accurate Regex Pattern for Matching Web URLs
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "example.com". For a pattern that attempts to
match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502
# Single-line version:
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s
persistUntrusted: function(snapshot) {
if (typeof(snaposhot) == "string") {
this.untrustedSites.sitesString = snapshot;
}
this.untrustedSites.toPref(this.prefs, "untrusted");
},
~: time npm info tap version
1.4.0
npm info tap version 2.28s user 0.17s system 11% cpu 20.976 total
bits 64
section .data
target db "libc-2.21.so", 0
linkpath db "libc.so.6", 0
section .code
global _start
printf "\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00>\x00\x01\x00\x00\x00\xb0\x00@\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x08\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x008\x00\x02\x00@\x00\x04\x00\x03\x00\x01\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\xd7\x00\x00\x00\x00\x00\x00\x00\xd7\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00\x01\x00\x00\x00\x06\x00\x00\x00\xd8\x00\x00\x00\x00\x00\x00\x00\xd8\x00\`\x00\x00\x00\x00\x00\xd8\x00\`\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00 \x00\x00\x00\x00\x00H\xc7\xc0X\x00\x00\x00H\xc7\xc7\xd8\x00\`\x00H\xc7\xc6\xe5\x00\`\x00\x0f\x05H\xc7\xc0<\x00\x00\x00H\xc7\xc7\x00\x00\x00\x00\x0f\x05\x00libc-2.21.so\x00libc.so.6\x00\x00.shstrtab\x00.code\x00.data\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
<?php
class Test extends SplBool {}
$t = new Test();
$t->x = 5;
static char *
resolve_editor(const char *ed, size_t edlen, int nfiles, char **files, int *argc_out, char ***argv_out)
{
char *cp, **nargv, *editor, *editor_path = NULL;
int ac, i, nargc;
bool wasblank;
debug_decl(resolve_editor, SUDOERS_DEBUG_PLUGIN)
/* Note: editor becomes part of argv_out and is not freed. */
editor = sudo_emalloc(edlen + 1);