$ git checkout web-123-my-branch # make sure you're on the right branch
$ git fetch # update remote refs
$ git rebase origin/master # perform the rebase onto the current state of master
# for each conflict, edit file, resolve conflicts, git add -u <file>, git rebase --continue
$ git push -f origin web-123-my-branch # overwrite remote branch with newly rebase branch
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
// For example, take 153 (3 digits): | |
// 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153 | |
// and 1634 (4 digits): | |
// 1^4 + 6^4 + 3^4 + 4^4 = 1 + 1296 + 81 + 256 = 1634 | |
// The Challenge: | |
// Your code must return true or false depending upon whether the given number is a Narcissistic number. |
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
// At the end of the first year there will be: | |
// 1000 + 1000 * 0.02 + 50 => 1070 inhabitants | |
// At the end of the 2nd year there will be: | |
// 1070 + 1070 * 0.02 + 50 => 1141 inhabitants (number of inhabitants is an integer) | |
// At the end of the 3rd year there will be: | |
// 1141 + 1141 * 0.02 + 50 => 1213 | |
// It will need 3 entire years. |
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
// Well, time to expand the family a little more: think of a Quadribonacci starting with a signature of 4 elements and each following element is the sum of the 4 previous, a Pentabonacci (well Cinquebonacci would probably sound a bit more italian, but it would also sound really awful) with a signature of 5 elements and each following element is the sum of the 5 previous, and so on. | |
// Well, guess what? You have to build a Xbonacci function that takes a signature of X elements - and remember each next element is the sum of the last X elements - and returns the first n elements of the so seeded sequence. | |
// xbonacci {1,1,1,1} 10 = {1,1,1,1,4,7,13,25,49,94} | |
// xbonacci {0,0,0,0,1} 10 = {0,0,0,0,1,1,2,4,8,16} | |
// xbonacci {1,0,0,0,0,0,1} 10 = {1,0,0,0,0,0,1,2,3,6} | |
// xbonacci {1,1} produces the Fibonacci sequence | |
function Xbonacci(signature, n){ |
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
------------------------------------------------------------- | |
// The process object is a global that provides information about, | |
// and control over, the current Node.js process. | |
// As a global, it is always available to Node.js applications without using require(). | |
// Instead of depending on process.argv property | |
// we can use a third party node module called `yargv` as process.argv | |
// can be a bit messy. | |
------------------------------------------------------------- |
Vá até o seu repositório e execute
git config core.filemode false
The examples here contain some hard-coded IDs. These are all examples. In your real code, you should already have the node IDs, file IDs, etc. in a variable.
Load a node by NID:
$nid = 123; // example value
$node_storage = \Drupal::entityTypeManager()->getStorage('node');
$node = $node_storage->load($nid);
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
handleReverseLookUp (event) { | |
const { | |
exchangeAmountPrecision, | |
currencyData, | |
conf, | |
exchangeRatePrecision | |
} = this.props; | |
const {currency} = this.state; | |
const {sendCurrency} = conf; | |
const el = event.target; |
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
# Git Shortcuts | |
alias gst='git status' | |
alias gp='git pull origin' | |
alias gcod='git checkout develop' | |
alias gcom='git checkout master' | |
alias gl='git log --oneline' | |
alias gd='git diff' | |
# Drush Shortcuts | |
alias dca='drush cc all' |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |