##Tirando uma foto na hora do commit com Mercurial!
Instale o imagesnap
brew install imagesnapNo arquivo ~/.hgrc
##Tirando uma foto na hora do commit com Mercurial!
Instale o imagesnap
brew install imagesnapNo arquivo ~/.hgrc
This is how you connect PS3 controller to Mac OSX, PC, etc. when previously connected to a PS3. You will need a Mini USB cable. Overcome your laziness, get up of your chair, and go get one!
A big misconception is that keep holding PS button will reset the controller's pairing. It DOES NOT! From my testings, the controller keeps paring with the last machine it was CONNECTED VIA A USB CABLE.
Here are the steps:
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
| 'use strict'; | |
| /*****************NATIVE forEACH*********************/ | |
| Array.prototype.myEach = function(callback) { | |
| for (var i = 0; i < this.length; i++) | |
| callback(this[i], i, this); | |
| }; | |
| //tests |
| /* ----------------------------------------- * | |
| Lazy List Implementation | |
| * ----------------------------------------- */ | |
| // Haskell-like infinite List, implemented with es6 generators | |
| // Lazyness lets you do crazy stuff like | |
| List.range(0, Infinity) | |
| .drop(1000) | |
| .map(n => -n) |
| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |
A list of topics to study before implementing a large and scalable React + Redux application.
| let binarySearch = function (array, valueSearch) { | |
| let start = 0; | |
| let end = array.length - 1; | |
| return function search(start, end) { | |
| let mid = Math.round((start + end) / 2); | |
| let length = end - start; | |
| if (length < 0) return -1; |
<script>
x = '<!--<script>'/*</script>-->*/;alert(1)