Skip to content

Instantly share code, notes, and snippets.

View qqilihq's full-sized avatar
🏃‍♂️
Finished 1/2 Marathon in 1:56:07

Philipp Katz qqilihq

🏃‍♂️
Finished 1/2 Marathon in 1:56:07
View GitHub Profile
@qqilihq
qqilihq / mongodb-stats.js
Created June 3, 2021 11:14
Get MongoDB collection stats
db.getCollectionNames().forEach(function (collectionName) {
const collection = db.getCollection(collectionName);
const stats = collection.stats();
print('COLLECTION: ' + collectionName);
print(' size(MB): ' + (stats.size/1024/1024).toFixed(2));
print(' count: ' + stats.count);
print(' avgObjSize: ' + stats.avgObjSize);
print(' storageSize(MB): ' + (stats.storageSize/1024/1024).toFixed(2));
print(' nindexes: ' + stats.nindexes);
print(' totalIndexSize(MB): ' + (stats.totalIndexSize/1024/1024).toFixed(2));
@qqilihq
qqilihq / index.html
Created May 11, 2017 15:47
Angular 1.6 minimal working example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>AngularJS minimal example for Klemens</title>
</head>
<body ng-app="myApp">
<h1>AngularJS minimal example for Klemens</h1>
@qqilihq
qqilihq / ObservableTableViewController.cs
Last active August 29, 2015 14:14 — forked from praeclarum/ObservableTableViewController.cs
Modifications for Xamarin Unified API, added ability to use from within Xamarin Storyboards.
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Diagnostics;
using Foundation;
using UIKit;
namespace Praeclarum.UI
{
[Register ("ObservableTableViewController")]