Skip to content

Instantly share code, notes, and snippets.

View abernix's full-sized avatar
🤗

Jesse Rosenberger abernix

🤗
View GitHub Profile
@abernix
abernix / z_collection-stub.js
Created August 28, 2015 14:34
A mock for the Meteor smart package collection-hooks. Add this file in the folder tests/jasmine/server/unit/
// publish-composite
Meteor.publishComposite = function () {};
beforeEach(function () {
Meteor.publishComposite = function () {};
});
var originalMeteorCollection = Meteor.Collection;
Meteor.Collection = function () {
@abernix
abernix / server.js
Last active December 10, 2015 10:09
VdanV
Dosare = new Meteor.Collection('dosare');
var soap = Meteor.npmRequire('soap');
var startDate = '2014-01-10';
var stopDate = '2014-01-12';
var url = 'http://portalquery.just.ro/Query.asmx?wsdl';
var args = {
institutie: 'CurteadeApelBUCURESTI',
data_start: startDate,
@abernix
abernix / setup_meteor_with_android_sdk_ubuntu_15_10.sh
Last active September 11, 2017 16:05
meteor android sdk setup on ubuntu 15.10
# Install NVM
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.29.0/install.sh | bash
# Install Node Version 0.10.32
# info: https://github.com/creationix/nvm
nvm install v0.10.32
nvm use v0.10.32
# Install requirements for Android SDK
# info: https://github.com/meteor/meteor/wiki/Mobile-Development-Install:-Android-on-Linux
20010 silly gunzTarPerm extractEntry fn/symbol/replace.js
20011 silly gunzTarPerm modified mode [ 'fn/symbol/replace.js', 438, 420 ]
20012 silly gunzTarPerm extractEntry fn/system/global.js
20013 silly gunzTarPerm modified mode [ 'fn/system/global.js', 438, 420 ]
20014 silly gunzTarPerm extractEntry library/fn/reflect/get-own-property-descriptor.js
20015 silly gunzTarPerm modified mode [ 'library/fn/reflect/get-own-property-descriptor.js', 438, 420 ]
20016 silly gunzTarPerm extractEntry library/fn/reflect/get-prototype-of.js
20017 silly gunzTarPerm modified mode [ 'library/fn/reflect/get-prototype-of.js', 438, 420 ]
20018 silly gunzTarPerm extractEntry library/fn/reflect/get-own-property-descriptor.js
20019 silly gunzTarPerm modified mode [ 'library/fn/reflect/get-own-property-descriptor.js', 438, 420 ]
@abernix
abernix / limit.maxfiles.plist
Created May 19, 2016 10:30
/Library/LaunchDaemons/limit.maxfiles.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
@abernix
abernix / keybase.md
Created September 16, 2016 16:35
Keybase proof

Keybase proof

I hereby claim:

  • I am abernix on github.
  • I am abernix (https://keybase.io/abernix) on keybase.
  • I have a public key whose fingerprint is 845D 41E4 6AEC 7638 2D37 8BE1 C0CC CF81 AA6C 08D8

To claim this, I am signing this object:

@abernix
abernix / hot-patch-7959.sh
Created October 28, 2016 14:31
Hot-Patch 1.4.2 --unsafe-perm issue
#!/bin/sh
hot_patch () {
echo "=> Hot-Patching Meteor 1.4.2 to not pass --unsafe-perm to springboarded version..."
echo "=> https://github.com/meteor/meteor/issues/7959"
echo "=> REMOVE THIS when Meteor 1.4.2.1 comes out!"
echo "$(dirname "$(readlink "$HOME/.meteor/meteor")")/tools/cli/main.js" | \
grep '/1\.4\.2/' | \
xargs perl -0pi.bak \
-e 's/(^\h+var newArgv.*?$)/$1\n\n newArgv = newArgv.filter(function (arg) { return arg !== "--unsafe-perm"; });/ms'
}
@abernix
abernix / limit.maxfiles.plist
Created November 11, 2016 16:58
OS X: LaunchCtl Limit MaxFiles
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
#!/bin/sh
run_it () {
# Pretty message function
NiceMsg () {
printf "\033[0;32m$1\033[0m\n"
}
# Version compare function

Raise Open File Limits in OS X

in OS X 10.4 to macOS sierra 10.12 and maybe higher!

Create Launcher Script:

/Library/LaunchDaemons/limit.maxfiles.plist

Copy this entire code block and paste it into your terminal and push Return to create this file for you with correct permissions. It will (probably) ask for your password: