Skip to content

Instantly share code, notes, and snippets.

View lesce's full-sized avatar

Lescenco Andrei Bogdan lesce

View GitHub Profile
@lesce
lesce / kops
Last active September 30, 2018 22:09
kops
brew update
brew install kops
brew install awscli
brew install kubernetes-cli
#signup for aws
#get API key and secret from https://console.aws.amazon.com/iam/home?region=eu-central-1#/security_credential
aws configure
#create IAM user/group
x, _ := ioutil.ReadAll(c.Request.Body)
fmt.Printf("%s", string(x))
@lesce
lesce / output.json
Last active February 23, 2018 06:21
PREIMAGES map[]
{
"root": "d7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544",
"accounts": {
"000d836201318ec6899a67540690382780743280": {
"balance": "200000000000000000000",
"nonce": 0,
"root": "56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"codeHash": "c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
"code": "",

Keybase proof

I hereby claim:

To claim this, I am signing this object:

def test
[0,1,2].each do |n|
x = "Da" if n == 2
end
x = "Nu" if x.nil?
return x
end
select recruits.first_name as first_name , recruits.last_name as last_name, recruits.email as email,
home_address.street as home_address_street,
home_address.street2 as home_address_street2,
home_address.zip as home_address_zip,
home_address.city as home_address_city,
home_address.state as home_address_state,
home_address.country as home_address_country,
home_address.phone as home_address_phone,
home_address.fax as home_address_fax,
work_address.street as work_address_street,
@lesce
lesce / gist:3879840
Created October 12, 2012 15:38
ctags with rvm gem list
ctags --extra=+f --exclude=.git --exclude=log -R * \`rvm gemdir\`/gems/*
map <Leader>rt :!ctags --extra=+f --exclude=.git --exclude=log -R * `rvm gemdir`/gems/*<CR><CR>
set shcf=-ic
<%= debug @user.user_addresses %>
<%= f.fields_for @user.user_addresses do |ua| %>
<%= debug ua.object.is_home_address %>
<%= debug ua.object.is_work_address %>
and in the browser I get this
---
- !ruby/object:UserAddress
attributes:
has_one :home_address, :class_name => 'UserAddress' , :conditions => { :is_home_address => true }
has_one :work_address, :class_name => 'UserAddress' , :conditions => { :is_work_address => true }