Skip to content

Instantly share code, notes, and snippets.

@bozhink
bozhink / run-mongod.sh
Created January 15, 2017 21:04
Disable localhost exception for mongod
mongod --dbpath . --auth --setParameter enableLocalhostAuthBypass=false
@bozhink
bozhink / mongod-config.yaml
Last active January 28, 2017 10:22
Configuration file for mongod
security:
authorization: 'enabled'
systemLog:
destination: file
path: /data/db/mongo.log
storage:
dbPath: /data/db
auditLog:
destination: file
format: JSON
<menu label="Share on..." id="supermenu">
<menuitem label="Twitter" onclick="window.open('//twitter.com/intent/tweet?text='+window.location.href);"></menuitem>
<menuitem label="Facebook" onclick="window.open('//facebook.com/sharer/sharer.php?u='+window.location.href);"></menuitem>
</menu>
function () {
window.location = 'mailto:?body=' + window.location.href;
}
$('*').filter(function () { return $(this).css('font-style') == 'italic' })
(function (window, document) {
'use strict';
var $ = window.$;
// ==================================================================
window.process = function () {
console.log('process');
data:text/html,%20<html%20contenteditable>
@bozhink
bozhink / ue-write-numbers.js
Last active February 16, 2017 21:09
UltraEdit macro for writing numbers in editor
function recall(num) {
UltraEdit.activeDocument.write(num + " ");
}
function num() {
var i = 0, j = 1, n = 0;
while (n < 10) {
recall(i);
var t = i;
i = j;
@bozhink
bozhink / ue-find-string.js
Created February 16, 2017 21:09
UltraEdit macro for string searching
//This script requires UltraEdit v13.10 or UEStudio v6.30 or any later.
//Get user input
var findStr;
var x = 0;
var lineNum;
var found;
//Clear the output window, make it visible and disable status information.
UltraEdit.outputWindow.showStatus=false;
UltraEdit.outputWindow.clear();
if (UltraEdit.outputWindow.visible == false) {
@bozhink
bozhink / ps-functions-with-code-completion.psm1
Created February 17, 2017 20:33
PowerShell: functions with code completion
<#
Import-Module *.psm1
#>
function Select-Color
{
param
(
[System.ConsoleColor]
$Color
)