I hereby claim:
- I am sas1ni69 on github.
- I am hass (https://keybase.io/hass) on keybase.
- I have a public key ASDI0TlPx_Kt83WkFRhxg_DfanWBDIknSV6UzVReNo5Scgo
To claim this, I am signing this object:
def format_name(format: "%{first_name} %{last_name}, (%{preferred_name})", **names) | |
defaults = { first_name: '', last_name: '', preferred_name: '' } | |
names = defaults.merge(names.slice(:first_name, :last_name, :preferred_name)) | |
(format % names).squish | |
end |
package main | |
import ( | |
"reflect" | |
"testing" | |
) | |
func BenchmarkBubbleSortWrostCase(b *testing.B) { | |
for n := 0; n < b.N; n++ { | |
unsortedArray := []int{97, 96, 95, 93, 93, 92, |
package main | |
func BubbleSort(array []int) []int { | |
if len(array) <= 1 { | |
return array | |
} | |
for i := 0; i <= len(array)-1; i++ { | |
for j := len(array) - 1; j > i; j-- { | |
if array[j] < array[j-1] { |
I hereby claim:
To claim this, I am signing this object:
module MonetizeJsonb | |
def monetize_jsonb(*attrs) | |
attrs.each do |attr_name| | |
define_method("#{attr_name}=") do |value| | |
value_in_cents = Monetize.parse(value, account.currency).cents | |
self.send("#{attr_name}_cents=", value_in_cents) | |
end | |
define_method(attr_name) do | |
Money.new(self.send("#{attr_name}_cents"), account.currency) |
This is an example from the blog post: http://www.ngauthier.com/2011/09/using-exceptions-to-manage-control-flow.html.
Please fork it and show me what you would do!
4C4F56 Abbey | |
1B1404 Acadia | |
7CB0A1 Acapulco | |
C9FFE5 Aero Blue | |
714693 Affair | |
D4C4A8 Akaroa | |
FAFAFA Alabaster | |
F5E9D3 Albescent White | |
93DFB8 Algae Green | |
F0F8FF Alice Blue |
for p in *;do | |
(cd $p && sips -Z 600 *.jpg) | |
done |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
ag | |
ctrlp.vim | |
emmet-vim | |
nerdtree | |
powerline-fonts | |
vim-airline | |
vim-bundler | |
vim-coffee-script | |
vim-commentary | |
vim-fugitive |