Skip to content

Instantly share code, notes, and snippets.

/**
* Hack to work around "TypeError: Converting circular structure to JSON"
* which is seen when using JSON.stringify
* Intended to inspection/debugging purposes.
* Note: Will not display an Array in square brackets.
* Shows extra trailing comma before closing brace.
* @param obj
* @param [onlyProps] - Show only property names
* @param {String[]} [skipTypes=['function']] - array of types to trace only the type instead of value.
* @return {String}
@hpinio
hpinio / uaseragents.csv
Last active July 16, 2022 12:10 — forked from asgrim/uaseragents.csv
user agents list
2347 Mozilla/5.0 (compatible; monitis - premium monitoring service; http://www.monitis.com)
910 Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML; like Gecko) Version/7.2.1.0 Safari/536.2+
678 checks.panopta.com
206 Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US); 0110120602120527
89 ClickTale bot
41 AddThis.com robot [email protected]
35 Mozilla/5.0 (BB10; Kbd) AppleWebKit/537.10+ (KHTML; like Gecko) Version/10.1.0.2342 Mobile Safari/537.10+
33 Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML; like Gecko) Version/10.1.0.2354 Mobile Safari/537.10+
31 Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML; like Gecko) Version/10.0.10.690 Mobile Safari/537.10+
25 Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML; like Gecko) Version/10.1.0.1720 Mobile Safari/537.10+
@hpinio
hpinio / UUID.php
Created February 27, 2016 14:48 — forked from dahnielson/UUID.php
Pure PHP UUID generator
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@hpinio
hpinio / TSQL-to-POCO
Created October 7, 2016 06:18 — forked from joey-qc/TSQL-to-POCO
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR
@hpinio
hpinio / electron-sqlite3.md
Created March 25, 2020 17:10 — forked from craigvantonder/electron-sqlite3.md
Electron SQLite3 Integration

Electron SQLite3 Integration

When trying to use the node-sqlite3 module in Electron I got the error:

Error: Cannot find module '/path/to/my/application/node_modules/sqlite3/lib/binding/electron-v1.4-linux-x64/node_sqlite3.node'

Using Ubuntu 16.04 with Node 7.1.0 and Electron 1.4.12.

I read the following: