I hereby claim:
- I am BuonOmo on github.
- I am ulysse (https://keybase.io/ulysse) on keybase.
- I have a public key ASDbVJjf42fm6IxIB-ZXs73n7JTntl9GQXWlHCI9C7ybcQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/* ================================= | |
Pass by parameter | |
================================= */ | |
function par(e) { | |
e = "bar"; | |
} | |
var a = "foo"; | |
par(a); | |
console.log("a: "+a); // "foo" |
# List of image ratio, every image should be <width>-<height> | |
list=(100-100 50-100 100-50 60-200 800-600) | |
# Options for unsplash, & separated (random, blur..) | |
opts="random&blur" | |
for i in $list;do ~/Images/unsplash | |
l=($(echo $i | tr '-' ' ')) | |
curl --output $i.jpg "https://unsplash.it/$l[1]/$l[2]?$opts" | |
done |
#!/bin/zsh | |
# Copyright (C) 2016 Ulysse Buonomo <buonomo.ulysse@gmail.com> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
@base <https://www.wikidata.org/wiki/> | |
@prefix fb: <https://facebook.com/> | |
@prefix gh: <https://github.com/> | |
# Friend Of A Friend | |
@prefix foaf: <http://xmlns.com/foaf/0.1/> | |
_:me foaf:firstname "Ulysse"^^string ; # could be integer or else |
#!/bin/sh | |
# Copyright (c) 2016 Ulysse Buonomo <buonomo.ulysse@gmail.com> (MIT license) | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# |
puts (1..10).map do |i| | |
doc = Nokogiri::HTML(open("http://www3.forbes.com/leadership/the-10-best-cities-for-jobs-in-2017/#{i}/")) | |
(11 - i).to_s + ": " + doc.css('.articleContentText > p > strong').text.split(' – ').pop | |
end.reverse |
#!/bin/sh | |
gh_user=BuonOmo | |
curl -u $gh_user 'https://api.github.com/search/code?q=*.github.io' > req.json | |
# set boundaries, default: {min: 0, max: 9} | |
[ $# -gt 0 ] && min=$1 && shift || min=0 | |
[ $# -gt 0 ] && max=$1 || max=9 |
The mapAndFilter()
method allow a user to use both mecanism without chaining. Which means that he can either return a value that will be mapped, or return undefined
(e.g. omit return
statement) in which case the current object will be filtered out of the array.
Optionnally, you can also set the filter token to be something else with undefined
if you want your array to contain undefined
items.
<div style="width:100%;padding:24px 0 16px 0;background-color:#f5f5f5;text-align:center"> | |
<div style="display:inline-block;width:90%;max-width:680px;min-width:280px;text-align:left;font-family:Roboto,Arial,Helvetica,sans-serif"> | |
<div style="display:block;padding:0 2px"> | |
<div style="display:block;background:#fff;height:2px"></div> | |
</div> | |
<div> | |
<div style="padding:24px 32px 32px 32px;background:#fff;border-right:1px solid #eaeaea;border-left:1px solid #eaeaea" dir="ltr"> | |
<div style="font-size:14px;line-height:18px;color:#444"> | |
<p>Hi Steve,</p> | |
<p> |