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
| Array.prototype.forEach.call($$('li[data-branch-name^="greenkeeper"] button[aria-label="Delete this branch"]'), function(el) { el.click() }) |
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
| /** | |
| * Deep diff between two object, using lodash | |
| * @param {Object} object Object compared | |
| * @param {Object} base Object to compare with | |
| * @return {Object} Return a new object who represent the diff | |
| */ | |
| function difference(object, base) { | |
| function changes(object, base) { | |
| return _.transform(object, function(result, value, key) { | |
| if (!_.isEqual(value, base[key])) { |
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
| class Com { | |
| constructor(){ | |
| // Bind eventhandlers to this | |
| this.click = this.click.bind(this) | |
| // No sideeffects: Templates should use only parameterized eventhandlers or own eventhandlers without this | |
| var v = remix(myDiv, { click: this.click, tag: 'button' }) | |
| // Attach view mnually, however you want | |
| this.el = v.el |
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
| <?php | |
| $users = [ | |
| [ 'age' => 40, 'fingers' => 2 ], | |
| [ 'fingers' => 4 ], | |
| [ 'name' => 'Hans', 'age' => 9, 'fingers' => 3 ], | |
| [ 'name' => 'Hans', 'age' => 9, 'fingers' => 6 ], | |
| [ 'name' => 'Hans', 'age' => 14, 'fingers' => 2 ], | |
| [ 'age' => 2 ], | |
| [ 'name' => 'Alex', 'age' => 20, 'fingers' => 2 ], |
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
| #!/bin/bash | |
| su root; | |
| # Open Downloads and download atom | |
| cd ~/Downloads; | |
| wget https://atom.io/download/rpm; | |
| mv rpm atom.x86_64.rpm | |
| # Install new atom |
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
| #!/bin/bash | |
| # Symlinking to /usr/local/bin needs root access | |
| # su root; | |
| # Set which version | |
| NODE_VERSION=12.18.2; | |
| # Open Downloads and download node | |
| cd ~/Downloads; |
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
| tpl = (x) => { | |
| return [ | |
| x(el('h1'), () => { | |
| setAttr(this, { | |
| title: this.title | |
| }) | |
| }), | |
| x(el('h1') | |
| ] | |
| } |
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
| MyCom = function() { | |
| var self = this | |
| this.title = "Hello" | |
| redomx(this, this.render) | |
| setTimeout(function() { | |
| this.title += "World" | |
| this.update() | |
| }, 500) |
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
| env DART_FLAGS=--checked /opt/dartium/chrome-wrapper --user-data-dir=~/.dartium |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
NewerOlder