https://atom.io/packages/activate-power-mode https://github.com/codeinthedark/awesome-power-mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <style> | |
| body { margin: 1em; } | |
| #map { height: 500px; } | |
| #intro { font-size: 14px; font-family: arial; max-width: 500px; margin: 1em auto 1em auto; text-align: justify; } | |
| </style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A Basic API Controller for Rails | |
| # Handles authentication via Headers, params, and HTTP Auth | |
| # Automatically makes all requests JSON format | |
| # | |
| # Written for production code | |
| # Made public for: http://broadcastingadam.com/2012/03/state_of_rails_apis | |
| # | |
| # Enjoy! | |
| class ApiController < ApplicationController |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # This is a basic deploy script for Heroku apps. | |
| # It provides a structure you can use to expand on | |
| # and add your own prereqs and deploy tasks. | |
| # | |
| # It basically ensures that: | |
| # 1. There are no uncommited files | |
| # 2. You can ssh to github | |
| # 3. You can connect to heroku |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ruby 1.9 supports 4 ways to call a proc! ex: f =->n {[:hello, n]}; f[:ruby]; f.call(:ruby); f.(:ruby) | |
| # | |
| # turns out, you can also call a proc via proc === :arg -- which means you can use proc's in when clauses! | |
| # ruby doc: http://ruby-doc.org/ruby-1.9/classes/Proc.html#M001165 | |
| # | |
| # ... kudos to @chadfowler for the tip! | |
| # | |
| # (note: works on 1.8.7 as well :-)) | |
| def am_i_awesome? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # In response to: | |
| # http://mlomnicki.com/ruby/tricks-and-quirks/2011/02/10/ruby-tricks2.html | |
| # Ruby 1.9.2 has some neat stuff that lets us make a readable | |
| # alternative case statement that calls each method in turn. | |
| # 1.9.2 features used: | |
| # * hashes are ordered in 1.9.2 | |
| # * cool JSON-style hash syntax | |
| # * concise lambda syntax |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ruby:2.3 | |
| ENV LC_ALL C.UTF-8 | |
| RUN apt-get update -y \ | |
| && apt-get install -y python-pip \ | |
| && pip install pygments | |
| RUN mkdir -p /app/vendor | |
| WORKDIR /app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # notify-send.sh - drop-in replacement for notify-send with more features | |
| # Copyright (C) 2015 Vyacheslav Levit <dev@vlevit.org> | |
| # 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| task :environment do | |
| require './dj-sinatra' | |
| end | |
| namespace :jobs do | |
| desc "Clear the delayed_job queue." | |
| task :clear => :environment do | |
| Delayed::Job.delete_all | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [user] | |
| name = Pavan Kumar Sunkara | |
| email = pavan.sss1991@gmail.com | |
| [core] | |
| editor = vim | |
| whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol | |
| excludesfile = ~/.gitignore | |
| [sendemail] | |
| smtpencryption = tls | |
| smtpserver = smtp.gmail.com |