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
// Given a list of numbers a and a number n, | |
// return the subset of a that sums to n, | |
// or return false if no such subset exists | |
function subsetSum(a, n) { | |
if (a.length === 0) return false | |
const el = a[0] | |
if (el === n) return [ el ] | |
const rest = a.slice(1) |
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
<Chain> | |
<PackageGroupRef Id="NetFx20Web"/> | |
<!-- more packages here --> | |
</Chain> | |
<!-- . . . --> | |
<Fragment> | |
<PackageGroup Id="NetFx20Web"> | |
<ExePackage InstallCondition="NOT VersionNT64 AND VersionNT <> v6.1" |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> | |
<Bundle Name="MyBootstrapper" Version="1.0.0.0" Manufacturer="" UpgradeCode="2d23a9d5-e503-4520-bfd7-07038bc8423b"> | |
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" /> | |
<Chain> | |
<!-- TODO: Define the list of chained packages. --> | |
<!-- <MsiPackage SourceFile="path\to\your.msi" /> --> | |
</Chain> | |
</Bundle> |
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
class UserPartial | |
constructor: (@parent) -> | |
Object.defineProperties @prototype, | |
userId: | |
get: -> @parent.getAttribute(‘data-id') |
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
get userId() { | |
return this.parent.getAttribute(‘data-id’); | |
} |
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
function UserPartial(parent) { | |
this.parent = parent; | |
// . . . | |
this.userId = this.parent.getAttribute(‘data-id’); | |
}; |
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
function UserPartial(parent) { | |
this.parent = parent; | |
this.firstName = this.parent.element(By.css('.app-first-name')); | |
this.lastName = this.parent.element(By.css('.app-last-name')); | |
this.username = this.parent.element(By.css('.app-username')); | |
}; | |
function InfoPage() { | |
this.users = element.all(By.css('.app-user')); | |
}; |
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
var LoginPage = function() { | |
this.userInput = element(by.model('username')); | |
this.passwordInput = element(by.model('password')); | |
this.loginButton = element(by.css('.app-login')); | |
this.get = function() { | |
browser.get('#/login'); | |
}; | |
this.login = function(username, password) { |
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
ls -lUd */ | awk '{print $9}' | while read -r i; do cd $i &> /dev/null; git remote -v 2> /dev/null | head -1; cd ..; done |
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
history | sed 's/ [ ]*/ /g' | cut -d' ' -f 3- | sort | uniq -c | sort -nr | head -10 | |
507 git st | |
167 git diff | |
150 git add . | |
131 git ci | |
109 git lg | |
91 ls | |
72 git pull | |
54 mvim | |
50 git push |
NewerOlder