All notable changes to this API will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Renamed
tagtoamenitywhere applicable. Expected date of removal: 2021-06-30GET /v3/tags
| require 'net/http' | |
| module Net | |
| class HTTP | |
| def self.enable_debug! | |
| class << self | |
| alias_method :__new__, :new | |
| def new(*args, &blk) | |
| instance = __new__(*args, &blk) | |
| instance.set_debug_output($stderr) | |
| instance |
| # frozen_string_literal: true | |
| module BigQuery | |
| class Client < Oauth2TokenStoreClient | |
| ENDPOINT = 'https://bigquery.googleapis.com/bigquery/v2' | |
| UPLOAD_ENDPOINT = 'https://bigquery.googleapis.com/upload/bigquery/v2' | |
| MULTIPART_BOUNDARY = 'bex835900724346' | |
| REQUIRED_SCOPE = 'https://www.googleapis.com/auth/bigquery' | |
| def initialize |
| ## CREATE EXAMPLE ## | |
| # folder: app/actions/posts | |
| class Actions::Posts::CreatePost | |
| include Actions::Posts::PostAction # In this scenario there is overlap between create & update, so introduce a concern | |
| def perform!(post, author_scope:) | |
| validate_action!(post, author_scope: author_scope) | |
| post.assign_attributes(attributes) | |
| post.save! |
All notable changes to this API will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
tag to amenity where applicable. Expected date of removal: 2021-06-30
GET /v3/tags| # frozen_string_literal: true | |
| module BookingExperts | |
| class Client | |
| class Error < StandardError; end | |
| class InvalidSignature < Error; end | |
| attr_accessor :token_store | |
| def initialize(token_store = nil) |
| ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}[" | |
| ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}" | |
| ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" | |
| ZSH_THEME_GIT_PROMPT_CLEAN="" | |
| #Customized git status, oh-my-zsh currently does not allow render dirty status before branch | |
| git_custom_status() { | |
| local cb=$(current_branch) | |
| if [ -n "$cb" ]; then | |
| echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" |
| class @BoundedEventBuffer | |
| constructor: ( options = {} ) -> | |
| @buffer = [] | |
| @processConditionMet = false | |
| @processing = false | |
| { @name, @bufferSize, @processWhen, @interval } = options | |
| @name = options.name ? 'AnonymousEventBuffer' | |
| @bufferSize = options.bufferSize ? 100 |
| #!/usr/bin/env ruby | |
| require 'yaml' | |
| require 'pg' | |
| # Usage | |
| if ARGV.size == 0 | |
| puts "Usage: script/dj_client WorkerName arg1 arg2" | |
| exit(0) | |
| end |
| Tracking and contributing to the trunk of a Subversion-managed project: | |
| # Clone a repo (like git clone): | |
| git svn clone http://svn.example.com/project/trunk | |
| # Enter the newly cloned directory: | |
| cd trunk | |
| # You should be on master branch, double-check with 'git branch' | |
| git branch | |
| # Do some work and commit locally to git: | |
| git commit ... |
| # Rails3 way to redirect non-www domain to www domain | |
| # Single domain redirect | |
| 'example.com'.tap do |host| | |
| constraints(:host => host) do | |
| match '/(*path)', :to => redirect { |params, request| Addressable::URI.escape request.url.sub(host, "www.#{host}") } | |
| end | |
| end |