This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT u.type, | |
| sum(u.total_of_logins) as total, | |
| sum(week1.total_of_logins) as week_1, | |
| sum(january.total_of_logins) as january | |
| FROM users u | |
| LEFT JOIN users week1 | |
| ON week1.id = u.id | |
| AND (week1.created_at >= '2017-01-01' AND week1.created_at <= '2017-01-07') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //selects the 3rd .screen_color_PHN from the .screen_color_PHN that contains the text `1` | |
| $("pre .screen_color_PHN:contains('1') ~ .screen_color_PHN:nth-of-type(3)") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /app/models/user.rb | |
| class User < ApplicationRecord | |
| enum kind: [:customer, :admin] | |
| belongs_to :status | |
| delegate :type, to: :status | |
| validates :name, :user_type, presence: true | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lib/tasks/remove_task.rake | |
| Rake::TaskManager.class_eval do | |
| def remove_task(task_name) | |
| @tasks.delete(task_name.to_s) | |
| end | |
| end | |
| def remove_task(name) | |
| Rake.application.remove_task(name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # touch /var/repo/app-staging.git/hooks/post-receive | |
| # chmod +x /var/repo/app-staging.git/hooks/post-receive | |
| #!/bin/bash -l | |
| APP_NAME=app-staging | |
| APP_ENV=staging | |
| APP_DB=app-database-name | |
| REPO_DIR="/var/repo/$APP_NAME.git" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Map; | |
| import java.util.HashMap; | |
| class Main { | |
| public static final Map BRACKETS = new HashMap<String, String>() {{ | |
| put("[", "]"); | |
| put("{", "}"); | |
| put("(", ")"); | |
| put("<", ">"); | |
| }}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| First, why don't you just export your spreadsheet as csv? Google has that feature built-in. It's under the menu File > Download as > CSV | |
| But, answering your question, it's pretty easy to wrap all values in doubles quotes. Let's say the desired values are on Sheet1 columns A to D. On Sheet2, cell A1, just place this formula: | |
| =ArrayFormula(""""&Sheet1!A:D&"""") | |
| The issue with the issue with the double quotes is that they're used as string delimiters, so to have them inside a string you have to type two consecutive. So, one " to open, two to have one "" and one " to close :) | |
| source: http://stackoverflow.com/questions/3315636/how-to-enclose-every-cell-with-double-quotes-in-google-docs-spreadsheet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| Gem::Ext::BuildError: ERROR: Failed to build gem native extension. | |
| An error occurred while installing thrift (0.9.2.0), and Bundler cannot continue. | |
| Make sure that `gem install thrift -v '0.9.2.0'` succeeds before bundling. | |
| ``` | |
| #add to ~/.bundle/config | |
| BUNDLE_BUILD__THRIFT: --with-cppflags="-D_FORTIFY_SOURCE=0 -Wno-shift-negative-value" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Disclosure: | |
| # Forked Repo: the original repository | |
| # Fork Repo: your repository | |
| # -- clone your fork | |
| $ git clone https://github.com/roalcantara/equalize.git | |
| # -- enters some branch | |
| $ cd equalize | |
| $ git checkout master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # See http://help.github.com/ignore-files/ for more about ignoring files. | |
| # compiled output | |
| /dist | |
| /tmp | |
| # dependencies | |
| /node_modules | |
| /bower_components |