(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
LIB=/home/matej/.rvm/rubies/ruby-1.9.2-p290/lib | |
INC=/home/matej/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ | |
CFLAGS=-I$(INC) -I/home/matej/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/i686-linux/ -g | |
LDFLAGS=-L$(LIB) -ldl -lruby1.9 | |
embed2: embed2.o | |
$(CC) -o embed2 embed2.o $(LDFLAGS) |
# Be sure to restart your server when you modify this file. | |
# Add new inflection rules using the following format | |
# (all these examples are active by default): | |
# ActiveSupport::Inflector.inflections do |inflect| | |
# inflect.plural /^(ox)$/i, '\1en' | |
# inflect.singular /^(ox)en/i, '\1' | |
# inflect.irregular 'person', 'people' | |
# inflect.uncountable %w( fish sheep ) | |
# end |
#!/usr/local/bin/python | |
""" | |
To use this script, you must be in the root directory of a Rails project that | |
is using git. You should also make sure that your directory does not contain any | |
uncommitted changes. Then run: | |
$ python rails_switch_branch.py name_of_another_branch | |
Running the above will do the following: |
if ::ActiveRecord::Base.connection_config[:adapter] == 'sqlite3' | |
if c = ::ActiveRecord::Base.connection | |
# see http://www.sqlite.org/pragma.html for details | |
# Page size of the database. The page size must be a power of two between 512 and 65536 inclusive | |
c.execute 'PRAGMA main.page_size=4096;' | |
# Suggested maximum number of database disk pages that SQLite will hold in memory at once per open database file | |
c.execute 'PRAGMA main.cache_size=10000;' |
#!/bin/sh | |
# Sublime Text 3 Install (last update: Monday 13 March 2017) | |
# | |
# No need to download this script, just run it on your terminal: | |
# | |
# curl -L git.io/sublimetext | sh | |
# Detect the architecture |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Not for everyone. Each programmer has their own appreciation of what is good coding music.
(From most influential to least)
Goal | CSS 3 | XPath | |
---|---|---|---|
All Elements | * | //* | |
All P Elements | p | //p | |
All Child Elements | p>* | //p/* | |
Element By ID | #foo | //*[@id=’foo’] | |
Element By Class | .foo | //*[contains(@class,’foo’)] | |
Element With Attribute | *[title] | //*[@title] | |
First Child of All P | p>*:first-child | //p/*[0] | |
All P with an A child | Not possible | //p[a] | |
Next Element | p + * | //p/following-sibling::*[0] |
This is all you really need to know in order to make Action Mailbox work in development.
ngrok http 3000
and make note of your subdomain for steps 3 and 8.https://XXX.ngrok.io/rails/action_mailbox/mailgun/inbound_emails/mime
action_mailbox:
mailgun_api_key: API KEY HERE
Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.
To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:
tell application "System Preferences"
set CurrentPane to the id of the current pane
set the clipboard to CurrentPane