Skip to content

Instantly share code, notes, and snippets.

View echoserver.yaml
apiVersion: v1
kind: Service
metadata:
name: echoserver
spec:
ports:
- port: 80
targetPort: 8080
selector:
app: echoserver
@warolv
warolv / eks-cluster.yml
Created Jul 31, 2020
EKS cluster config for eksctl
View eks-cluster.yml
ApiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: eks-ci-cd
region: us-east-1
vpc:
subnets:
private:
us-east-1a:
id: "subnet-private-id1"
@warolv
warolv / exampe.coffee
Created Nov 10, 2013
Document ready for angular
View exampe.coffee
angular.element(document).ready ->
@warolv
warolv / gemfile.rb
Created Nov 10, 2013
Gem File example to start with
View gemfile.rb
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.1'
group :production do
gem 'pg'
gem 'rails_12factor'
end
@warolv
warolv / example.rb
Last active Dec 27, 2015
Octopress Commands
View example.rb
rake generate # Generates posts and pages into the public directory
rake watch # Watches source/ and sass/ for changes and regenerates
rake preview # Watches, and mounts a webserver at http://localhost:4000
rake 'new_post["Building Form Ajax Validator"]' # Generate new post
# Create a new page
rake new_page[super-awesome]
rake new_page[super-awesome/page.html]
@warolv
warolv / example.rb
Created Nov 3, 2013
Rails’ index_by: the easy way to convert an Array to a Hash
View example.rb
Post.all.index_by { |post| post.id }
# => { 1 => #<Post ...>, 2 => #<Post ...>, ... }
Post.all.index_by(&:title)
# => { "My first post" => #<Post ...>, "My second post" => #<Post ...>, ... }
@warolv
warolv / en.yml
Created Oct 29, 2013
i18n Text inclusion
View en.yml
branding_logo_link: "To select branding logo for your business %{text}"
@warolv
warolv / en.yaml
Created Oct 29, 2013
I18n Link inclusion
View en.yaml
branding_logo_link: "To select branding logo for your business %{link:click}"
@warolv
warolv / rails_ujs.html.haml
Created Oct 20, 2013
Rails UJS events handling example using form
View rails_ujs.html.haml
$(document)
.on('ajax:beforeSend', '#scheduling_options_form', function() {
console.log('beforeSend');
$('.ajax-loader').show();
})
.on('ajax:success', '#scheduling_options_form', function(data, status, xhr) {
console.log('Success');
$('.ajax-loader').hide();
})
.on('ajax:error', '#scheduling_options_form', function(data, status, xhr) {
@warolv
warolv / application.html.rb
Created Oct 14, 2013
Adding placeholder for app to use Angular
View application.html.rb
- if content_for?(:angular_module)
= javascript_include_tag 'angular'
= javascript_include_tag 'angular-resource'
= javascript_include_tag 'angular-ui-bootstrap'
= javascript_include_tag 'angular-sanitize'
You can’t perform that action at this time.