Skip to content

Instantly share code, notes, and snippets.

@jose8a
jose8a / Nokogiri---BrewUpdate Error Fix
Last active August 29, 2015 14:15
Error: Permission denied - /usr/local/Cellar/libiconv/1.14 when running brew upgrade. ==> possible solution
Original issue thread here: https://github.com/sparklemotion/nokogiri/issues/754
I know it's a long time after this issue was closed and I appreciate this is a libiconv / homebrew issue, but just in case others come this way just like me...
In the process of trying to get a zero warnings install of nokogiri on Mac OSX 10.9.3... I had the same problem as @geraldarthur upgrading from libiconv 1.13 to 1.14, namely:
Error: Permission denied - /usr/local/Cellar/libiconv/1.14 when running brew upgrade.
My kludge -
ls -l /usr/local/Cellar/ showed all directories except libiconv owned by me. libiconv owned by root and not otherwise writable. So permission denied not surprising.
$ ls -l /usr/local/Cellar/
@jose8a
jose8a / NPMDebuggingTips
Last active August 29, 2015 14:16
NPM debugging tips
https://github.com/npm/npm/wiki/Troubleshooting#if-your-npm-is-broken
https://docs.npmjs.com/misc/removing-npm
http://stackoverflow.com/questions/22562041/global-installation-with-npm-doesnt-work-after-mac-os-x-mavericks-update
@jose8a
jose8a / Bash_folder_iterating
Last active August 29, 2015 14:16
Iterating/recursing over files in a directory. 'Find' is more powerful and flexible.
#!/bin/bash
# Method #1: Recursive 'find' w/it's powerful -OPTIONS filtering
# and then piping the results to a 'while' command for performing
# multiple file-by-file actions.
#
# Only explore this folder level
# Only return "dotfiles"
find . -maxdepth 1 -name ".*" | while read fname; do
regex="^\./(\.[a-zA-Z0-9_]+)"
@jose8a
jose8a / bash_cheatsheet
Created February 28, 2015 13:41
My Cheatsheet for commands I've found very useful, but not used often enough to commit usage to memory.
# Symbolic (soft)-linking files
# Example: ln -s ./myfile $HOME/myfile creates a symlink in the $HOME folder that
# points to myfile in the current directory.
# Format:
ln -s path/to/realfile path/to/symlink
#
@jose8a
jose8a / Capfile
Last active August 29, 2015 14:17
Capfile, deploy.rb and production.rb -- modified from original outlines according to the Deploying Rails Applications book instructions (Quickstarts Ch4 and 16)
# Load DSL and Setup Up Stages
require 'capistrano/setup'
# Includes default deployment tasks
require 'capistrano/deploy'
# Includes tasks from other gems included in your Gemfile
#
# For documentation on these, see for example:
#
@jose8a
jose8a / basic_rails_template.rb
Last active August 29, 2015 14:18
Basic Rails Template
#####################################################################################################################
##### Rails Template adapted from:
##### https://damirsvrtan.github.io/blog/2014/11/26/automate-generating-new-rails-applications/
#####
#####################################################################################################################
#####################################################################################################################
##### Create a bin/setup file so new developers can start right away by executing just one command
##### Move this part once Rails 4.2.0 comes out, b/c the bin/setup script will be in
##### new Rails projects by default.
@jose8a
jose8a / RailsTestingSetupGuide
Last active August 29, 2015 14:18
Guide for setting up TDD, BDD, or Unit testing in a rails app ... primarily for setting up tests with Rails App Template
##Resources
https://semaphoreci.com/community/tutorials/setting-up-the-bdd-stack-on-a-new-rails-4-application
https://robots.thoughtbot.com/how-we-test-rails-applications
http://devblog.avdi.org/2012/08/31/configuring-database_cleaner-with-rails-rspec-capybara-and-selenium/
## Install Rails and the default gems
####Generate new rails app w/out default test and without default 'bundle'ing
rails new --skip-test-unit --skip-bundle myapp
####Manually install gems locally into per-project bundle

Brief notes on Meteor for CS 294-101. Many of the key architectural ideas in Meteor are described at https://www.meteor.com/projects.

  1. BSD as example of great system design. Application primitives: processes run by a scheduler, sockets, sys calls, virtual memory, mbufs. What makes something a platform. Unix vs Multics.

  2. History of application architectures. Mainframes (e.g. IBM 360 / 3270), client-server (e.g. Win32), web (e.g. LAMP), cloud-client. Oscillation of where the software runs. Thin vs thick clients, data vs presentation on the wire. Changes driven by massive forces (cheap CPUs, ubiquitous internet, mobile). New architecture for each era.

  3. What it takes to make modern UI/UX. Mobile. Live updating. Collaboration. No refresh button. All drive the need for “realtime” or “reactive” system. Very different from HTTP era.

  4. Four questions: 1 — how do we move data around; 2 — where does it come from; 3 — where do we put it; 4 — how do we use it?

@jose8a
jose8a / ECMA-262-3-Detailed
Created April 20, 2015 07:47
ECMA-262-3 in detail
Javascript - The Core
http://dmitrysoshnikov.com/ecmascript/javascript-the-core/
Ch1 - Execution Contexts - background
http://dmitrysoshnikov.com/ecmascript/chapter-1-execution-contexts/
Ch2 - Variable Object
http://dmitrysoshnikov.com/ecmascript/chapter-2-variable-object/
Ch3 - This
@jose8a
jose8a / ECMA-262-5-Detailed
Created April 20, 2015 07:57
ECMA-262-5 in detail
Ch0 - Introduction
http://dmitrysoshnikov.com/ecmascript/es5-chapter-0-introduction/
Ch1 - Properties and Property Descriptors
http://dmitrysoshnikov.com/ecmascript/es5-chapter-1-properties-and-property-descriptors/
Ch2 - Strict Mode
http://dmitrysoshnikov.com/ecmascript/es5-chapter-2-strict-mode/
Ch3.1 - Lexical Environments: Common Theory