Skip to content

Instantly share code, notes, and snippets.

View marg51's full-sized avatar
🎯
Focusing

Laurent M marg51

🎯
Focusing
View GitHub Profile
wage() {
curl -s -XPOST 'http://www.thesalarycalculator.co.uk/salary.php' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Connection: keep-alive' --data "salary=$1&age=low&taxcode=&bonus=&payperiod=12&otime1=&orate1=1.5&otime2=&orate2=2&pensiontype=employer&pension=&childcare=&sacrifice=&sacrificeperiod=12&taxablebenefits=&benefitperiod=12&pretax=&posttax=&chosenTaxYear=2016&submit=Go%21&timeperiods%5B%5D=1&timeperiods%5B%5D=12&timeperiods%5B%5D=52&timeperiods%5B%5D=260&submit=" | pup '.takehome td:nth-child(3) text{}'
}
# `source .aliases`
@marg51
marg51 / app.js
Created September 10, 2016 14:33
List all URLs of your app from ui-router
app.run( ($state) => {
const indexed_state = {}
const states = $state.get()
states.forEach( state => {
indexed_state[ state.name ] = state
})
const URLs = states.map( state => getUrlOf(state) )