Skip to content

Instantly share code, notes, and snippets.

var apiKey = '???';
var title_id = 'fld-6c97429a5f8e46a9933a86119280a554';
var year_id = 'fld-1c0c8069a16042398f3fbad20cd26c37';
var released_id = 'fld-eed9e37f8fc54b15acf578f54a16badf';
var poster_id = 'fld-48de251236474e1a8df96e25d9b1959f';
var imdbid_id = 'fld-d02993f5eea644e69d53edcd805b6217';
var type_id = 'fld-3347d9d91d0a4cdea945e9d271914c9a';
var table_id = 'fld-12581e5b520d455bacdd5ef164969239';
@pasamio
pasamio / README.md
Created February 25, 2019 00:36 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

==================================================================
Start "State Watcher (Purchases)" script execution at Fri Nov 30 2018 23:37:44 GMT-0800 (PST)
==================================================================
Fri Nov 30 2018 23:37:44 GMT-0800 (PST) Current State: undefined
Fri Nov 30 2018 23:37:44 GMT-0800 (PST) Previous State: undefined
Fri Nov 30 2018 23:37:44 GMT-0800 (PST) Ship Date: undefined
Fri Nov 30 2018 23:37:44 GMT-0800 (PST) Received Date: undefined
Fri Nov 30 2018 23:37:44 GMT-0800 (PST) Previous state not set, resetting to current state and forcing update; this should only happen once.
Fri Nov 30 2018 23:37:44 GMT-0800 (PST) Purchase date set and state is undefined, updating state to Purchased.
// ========== Logger Start ========== //
// NAME: Logger
// VERSION: 1.0.1
/**
* Logger module provides some extra utility functions for logging data.
* This adds some useful functions for integrating with the console and
* for building script fields.
*/
var logger = (function() {
var logdata = "";
@pasamio
pasamio / backup-db.php
Created March 23, 2018 07:51
Backup CouchDB instance to local JSON files.
#!/usr/bin/php -n -d error_reporting=-1 -d display_errors=1 -d memory_limit=1G
<?php
ini_set('error_reporting', -1);
ini_set('display_errors', 1);
foreach(glob(realpath(dirname(__FILE__)) . '/configs/*.ini') as $configFile)
{
processUpdate(parse_ini_file($configFile));
}
@pasamio
pasamio / build-tree.php
Last active March 24, 2018 17:18
TF CouchDB Field Extractor
#!/usr/bin/php -n -d error_reporting=-1 -d display_errors=1
<?php
foreach(glob(realpath(dirname(__FILE__)) . '/configs/*.ini') as $configFile)
{
buildTree(parse_ini_file($configFile));
}
die("All done\n");
<?php
require_once('uuid.php');
function generateDocumentId()
{
return 'rec-' . str_replace('-', '', UUID::mint()->string);
}
function getTemplate($id, $createdDate) {
@pasamio
pasamio / .profile
Created February 14, 2014 23:40
Copy of my .profile for environments with shared NFS home directories (per server history file)
export PS1='\h:\W \u\$ '
alias v='ls -lh'
alias vv="du --max-depth=1 -k | sort -n | cut -f2 | xargs -d '\n' du -sh"
# Let the computer remember that which would otherwise be forgotten.
# Append to the history otherwise multiple tabs clobber each other.
shopt -s histappend
# Set the number of entries in the history file to be sufficiently large.
@pasamio
pasamio / gist:8674045
Created January 28, 2014 19:06
Simple command to get a list of larger directories (100MB or more)
du -sm * | sort -g -r | egrep ^[0-9]{3}
<?php
/**
* @package Gris-Gris.Skeleton
* @subpackage Builder
*
* @copyright Copyright (C) 2014 Respective authors. All rights reserved.
* @license Licensed under the MIT License; see LICENSE.md
*/
namespace Grisgris\Builder;