Get Homebrew installed on your mac if you don't already have it.
brew install highlight
Get Homebrew installed on your mac if you don't already have it.
brew install highlight
PG::InternalError: ERROR: incompatible library "/usr/local/lib/postgresql/postgis-2.4.so": version mismatch
DETAIL: Server is version 9.6, library is version 10.0.
: CREATE EXTENSION IF NOT EXISTS "postgis"
/Users/bruce/Projects/HB-Backend/db/migrate/20151013213623_enable_postgis.rb:3:in `change'
-e:1:in `<main>'
Caused by:
# Source: https://stackoverflow.com/questions/19008614/find-files-with-illegal-windows-characters-in-the-name-on-linux | |
# reserved characters for filename on windows: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx | |
find . -name '*[<>:/\\|?*]*' |
ℹ️ There is a newer alternative project that does similar things and more, check it out at https://github.com/stevenilsen123/mac-keyboard-behavior-in-windows
Make Windows PC's shortcut act like macOS (Mac OS X) (using AutoHotkey (ahk) script)
With this AutoHotKey script, you can use most macOS style shortcuts (eg, cmd+c, cmd+v, ...) on Windows with a standard PC keyboard.
javascript: ! function() { | |
$(".js-num-cards").each(function(i) { | |
var size = $(".js-list:nth(" + i + ") .list-card-details").length; | |
$(".js-num-cards:nth(" + i + ")").text(size + " cards"); | |
}); | |
$(".js-num-cards").toggleClass('hide'); | |
if ($(".board-header-btn-name .js-list-card-count").length === 0) { | |
$(".board-header-btn-name span").append(" <span class=\"js-list-card-count\"></span>"); |
curl -X POST -F "id={the url}" -F "scrape=true" "https://graph.facebook.com" | |
# from http://stackoverflow.com/questions/12100574/is-there-an-api-to-force-facebook-to-scrape-a-page-again |
# Available cops (199) + config for /Users/bruce/Projects/rails: | |
# Type 'Lint' (36): | |
Lint/AmbiguousOperator: | |
Description: Checks for ambiguous operators in the first argument of a method invocation | |
without parentheses. | |
StyleGuide: https://github.com/bbatsov/ruby-style-guide#parens-as-args | |
Enabled: false | |
Lint/AmbiguousRegexpLiteral: | |
Description: Checks for ambiguous regexp literals in the first argument of a method |
# encoding: utf-8 | |
# work-around from http://stackoverflow.com/a/15017892 | |
required_version_gems = %w( | |
awesome_print-1.2.0 | |
hirb-0.7.2 | |
hirb-unicode-0.0.5 | |
unicode-display_width-0.1.1 | |
) | |
required_version_gems.each do |version_gem| |
require 'benchmark' | |
require "active_support/core_ext/object/blank" | |
TIMES = 1000000 | |
Benchmark.bmbm do |x| | |
x.report("if present? (actually present)") do | |
TIMES.times do | |
if "1".present? |
# source: http://jokercatz.blogspot.tw/2013/09/rails-get-all-models.html | |
#first load all models | |
Rails.application.eager_load! | |
#okay…each now :) | |
ActiveRecord::Base.send(:subclasses).each do |model| | |
puts model.name | |
end |