Skip to content

Instantly share code, notes, and snippets.

@RobertLowe
RobertLowe / list.txt
Created Sep 27, 2018
twitch.tv all non-automated tags
View list.txt
100%
3D Modeling
3D Printing
Achievement Hunting
Action
Adventure
Adventure Game
All pick
AMA
Animals
@RobertLowe
RobertLowe / README.md
Last active Apr 6, 2018
forceFinderBoundsAndPosition.scpt
View README.md

Force Finder Bounds and Position - Stay boy stay!

Create files below and and load:

launchctl load ~/Library/LaunchAgents/com.you.forceFinder.plist

Enjoy Finder windows with a static position and size! Adjust to your personal preferences.

Stay in place finder

@RobertLowe
RobertLowe / resolving.js
Created Mar 14, 2018
Stop using async with Meteor. Futures are the future (still).
View resolving.js
// Go forth and code with the simplicity of sync
//
// PSA: this isn't production ready, and just a PoC, but enjoy using it!
// server only, as we need fibers (co-routines)!
import Future from 'fibers/future';
let resolving = (object, operation, ...args)=>{
let future = new Future();
@RobertLowe
RobertLowe / mango.md
Created Mar 9, 2018
Meteor <-> Mongo, positional operator caution
View mango.md

This is poor behaviour from Mongo, and sorta fixed in 3.6 via the $[] operator (which is coming in Meteor 1.6.2), you should verify your apps aren't effected

But, $ probably isn't working as expected (in some cases)

$ | Acts as a placeholder to update the first element that matches the query condition.

https://docs.mongodb.com/manual/reference/operator/update-array/#update-operators

Docs are correct, but consider this example:

@RobertLowe
RobertLowe / json
Last active Jan 6, 2018
IBM EoD 2014->2016
View json
[ {
"date": "2014-01-02T14:30:00.000Z",
"open": 187.2100067138672,
"low": 185.1999969482422,
"high": 187.39999389648438,
"close": 185.52999877929688,
"volume": 4546500
}, {
"date": "2014-01-03T14:30:00.000Z",
"open": 185.8300018310547,
@RobertLowe
RobertLowe / ubuntu-12.04-lts.erb.sh
Created Apr 26, 2012
chef ubuntu 12.04 LTS bootstrap
View ubuntu-12.04-lts.erb.sh
bash -c '
if [ ! -f /usr/bin/chef-client ]; then
apt-get update
apt-get -y upgrade
apt-get install -y build-essential wget zlib1g-dev libssl-dev libffi-dev libncurses-dev libreadline-dev libyaml-dev libffi6 libssl0.9.8
wget https://s3.amazonaws.com/dev.ops/ruby-1.9.3-p194-perf_without_psych_no_warnings_amd64.deb
dpkg -i ruby-1.9.3-p194-perf_without_psych_no_warnings_amd64.deb
wget http://production.cf.rubygems.org/rubygems/rubygems-1.8.23.tgz
@RobertLowe
RobertLowe / yaml.rb.diff
Created Apr 26, 2012
No, you shutta-upa
View yaml.rb.diff
diff a/lib/yaml.rb b/lib/yaml.rb
--- a/lib/yaml.rb
+++ b/lib/yaml.rb
@@ -57,9 +58,6 @@
require 'psych'
engine = 'psych'
rescue LoadError
- warn "#{caller[0]}:"
- warn "It seems your ruby installation is missing psych (for YAML output)."
- warn "To eliminate this warning, please install libyaml and reinstall your ruby."
@RobertLowe
RobertLowe / gist:2065750
Created Mar 17, 2012
Load a Chef::Node and convert it to an actual Node object
View gist:2065750
# load a chef node and turn it into an actual node object
node = Chef::Node.load("xxxx") # returns a hash
node = Chef::Node.new.tap do |n|
n.name( node["name"] )
n.chef_environment( node["chef_environment"] )
n.run_list( node["run_list"])
n.normal_attrs = node["normal"]
n.default_attrs = node["default"]
@RobertLowe
RobertLowe / gist:1085832
Created Jul 16, 2011
Changes from ruby 1.9.2p180 -> 1.9.2p290
View gist:1085832
Sat Jul 9 19:25:02 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* ext/tk/extconf.rb: I gave up to fix the build issue of ext/tk with Windows
installer (mingw32). Ported whole ext/tk/extconf.rb from trunk.
Mon Jul 4 00:28:05 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
* ext/tk/extconf.rb (find_tcl): fixed a TypeError on --with-opt-dir.
reported by luislavena and ksmakoto.
View gist:1033589
# robgleeson's fork much improved
class ErrorDelegate
attr_reader :pointer
alias_method :to_pointer, :pointer
def initialize
@pointer = Pointer.new_with_type '@'
end