Skip to content

Instantly share code, notes, and snippets.

View devinrhode2's full-sized avatar
😀

Devin Rhode devinrhode2

😀
View GitHub Profile
@devinrhode2
devinrhode2 / install.rb
Last active December 22, 2023 06:11 — forked from aubguillemette/install.rb
Homebrew without sudo-Aub's fork with a few minor changes from kenchan's fork
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# chmod +x install.rb
# ./install.rb
YOUR_HOME = ENV['HOME']
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local"
system "mkdir -p #{HOMEBREW_PREFIX}"
HOMEBREW_CACHE = "#{YOUR_HOME}/Library/Caches/Homebrew"
HOMEBREW_REPO = 'https://github.com/Homebrew/brew'
@devinrhode2
devinrhode2 / README.md
Last active April 10, 2023 12:20 — 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:

https://www.google.com/search?q=test&ie=UTF-8&oe=UTF-8&hl=en&client=safari
http ://www.google.com/search?q=test+&rlz=1Y3TXLS_enUS526US526&aq=f&oq=test+&client=ms-android-google&sourceid=chrome-mobile&ie=UTF-8
https://www.google.com/search?q=test &aq=f &oq=test &aqs=chrome.0.57j61l3j60j0.139&sourceid=chrome&ie=UTF-8
{google:baseURL}search?q=%s &{google:RLZ}{google:acceptedSuggestion}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}ie={inputEncoding}
https://www.google.com/search?q=the+thing+i+want+to+do+i+don't+romans&aq=1&oq=the+thing+I+w&aqs=chrome.2.57j0l3j62l2.7591&sourceid=chrome&ie=UTF-8
{google:baseURL}search?q=%s &{google:RLZ}{google:acceptedSuggestion}{google:originalQueryForSuggestion}{google:assistedQueryStats}{google:searchFieldtrialParameter}{google:searchClient}{google:sourceId}{google:instantExtendedEnabledParameter}ie={inputEncoding}
ios, then
@devinrhode2
devinrhode2 / emuparadise.download.user.js
Created September 29, 2019 04:21 — forked from infval/emuparadise.download.user.js
emuparadise.me download workaround (Most games + Sega Dreamcast, Books/Comics/Guides/Magazines)
// ==UserScript==
// @name EmuParadise Download Workaround
// @version 1.2.2
// @description Replaces the download button link with a working one
// @author infval (Eptun)
// @match https://www.emuparadise.me/*/*/*
// @grant none
// ==/UserScript==
// https://www.reddit.com/r/Piracy/comments/968sm6/a_script_for_easy_downloading_of_emuparadise_roms/
@devinrhode2
devinrhode2 / install.rb
Last active September 28, 2020 02:32 — forked from skyl/install.rb
Homebrew without sudo
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# chmod +x install.rb
# ./install.rb
YOUR_HOME = ENV['HOME']
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local"
system "mkdir -p #{HOMEBREW_PREFIX}"
HOMEBREW_CACHE = "#{YOUR_HOME}/Library/Caches/Homebrew"
HOMEBREW_REPO = 'https://github.com/Homebrew/brew'
@devinrhode2
devinrhode2 / decorators.js
Created November 27, 2018 19:26 — forked from RSNara/decorators.js
An example of using decorators in ES5.
function memoize(object, name, descriptor) {
var fn = descriptor.value;
var memoized = function() {
memoized.cache = memoized.cache || {};
var key = JSON.stringify(arguments);
return memoized.cache[key] = memoized.cache[key]
? memoized.cache[key]
: fn.apply(this, arguments);
}
descriptor.value = memoized;
@devinrhode2
devinrhode2 / binaryUtil.js
Created January 10, 2018 19:57 — forked from belohlavek/binaryUtil.js
ASCII to Binary and Binary to ASCII Utility functions in Javascript.
var Util = {
toBinary: function(input) {
var result = "";
for (var i = 0; i < input.length; i++) {
var bin = input[i].charCodeAt().toString(2);
result += Array(8 - bin.length + 1).join("0") + bin;
}
return result;
},
assertEqual: function(actual, expected) {
// Uses TraceKit to get stacktrace of caller,
// it looks for the line number of the first anonymous eval
// Stack traces are pretty nasty and not standardized yet
// so this is not as elegant as one might hope.
// Safari doesn't even give line numbers for anonymous evals,
// so they can go sit in the dunce corner today.
// This returns 0 if not found, which will mean that all
// the assertion failures are shown on the first line.
var getLineNum = function(stacktrace) {
data:text/html,
<body id='b'>
<textarea spellcheck="false" id="t" autofocus></textarea>
<script>
var f,
t = document.getElementById("t"),