This file contains 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
# "Merge" a single file from another branch (won't merge the history!!!) | |
$ git checkout BRANCH path/filename | |
# List the files changed between branches | |
$ git diff --name-status BRANCH_A BRANCH_B |
This file contains 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
<?php | |
// From http://www.iso.org/iso/home/standards/country_codes/country_names_and_code_elements_txt.htm | |
// Last update: 2013-02-14 | |
// Every word in country names begin with uppercase letters, except for prepositions and alike | |
$countries = array( | |
'AF' => "Afghanistan", | |
'AX' => "Åland Islands", | |
'AL' => "Albania", |
This file contains 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
<?php | |
// From http://www.loc.gov/standards/iso639-2/php/code_list.php | |
// Last update: 2013-02-14 | |
// Using only the bibliographic (B) codes | |
$languages = array( | |
'aar' => "Afar", | |
'abk' => "Abkhazian", | |
'ace' => "Achinese", |
This file contains 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
# Condensar os ultimos N commits em um so. | |
# Marque como "squash" os commits que devem ser | |
# integrados com o item anterior, na lista | |
git rebase -i HEAD~N | |
# Remover um branch remoto (a diferenca eh os ":") | |
# REMOTE eh seu repositorio remoto (origin, por exemplo) | |
# BRANCH eh o nome do branch que voce quer remover | |
git push REMOTE :BRANCH |
This file contains 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle', | |
timers: null, | |
// contrived examples are contrived, I used `init` because I know what I'm doing | |
initTimers: Ember.on('init', function() { | |
this.set('timers', [ |
This file contains 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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
value: 0, | |
logger: "Default initial value", | |
_willRender: function() { | |
this.set('logger', this.get('logger') + '\nEVENT: willRender'); | |
}.on('willRender') | |
}); |
This file contains 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
@SpringBootApplication | |
public class CloudExperimentApplication implements CommandLineRunner { | |
private final Logger logger = LoggerFactory.getLogger(getClass()); | |
@Autowired | |
private Environment environment; | |
public static void main(String[] args) { | |
SpringApplication.run(CloudExperimentApplication.class, args); |
This file contains 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 Ember from 'ember'; | |
import DocCaixa from '../models/docCaixa'; | |
export default Ember.Controller.extend({ | |
appName: 'Boletos', | |
model: new DocCaixa(), | |
linhaInput: '', | |
actions: { | |
parseLinha: function() { | |
this.get('model').parseLinha(this.get('linhaInput')); |