Skip to content

Instantly share code, notes, and snippets.

View tundal45's full-sized avatar
👻
there is more to life than coding

Ashish Dixit tundal45

👻
there is more to life than coding
View GitHub Profile
@subelsky
subelsky / asset.rake
Created March 3, 2013 21:48
Quick rake task to check if assets need to pre-compiled before deployment (since I don't like precompiling during deployment)
namespace :assets do
task :check do
root_dir = File.join(File.dirname(__FILE__),"..","..")
assets_last_modified_at = Dir["#{root_dir}/app/assets/**/**"].map { |p| File.mtime(p) }.sort.last
assets_last_compiled_at = Dir["#{root_dir}/public/assets/**/**"].map { |p| File.mtime(p) }.sort.last
if assets_last_modified_at > assets_last_compiled_at
fail "Assets need to precompiled; last asset modified at #{assets_last_modified_at}"
end
end
@afcapel
afcapel / how-the-web-works.md
Last active November 15, 2016 21:23
Article for the amazing practicing ruby Tech Writing Clinic. http://elmcitycraftworks.org/post/36678454423/technical-writing-clinic-winter-2013 One assignment was to write an article explaining a technical concept to non technical readers. Here is my article.

My job, explained so my mom can understand it

"I am a freelance Ruby and Rails developer". When I talk with my geek friends, everyone understands what I do and they have a reasonable understanding of how I spend my day. But sometimes, less technical people ask me what I do for a living and then I tend to dumb down the answer: "I am a programmer, I usually build websites.". Oh -they say- my nephew also make websites, he even built me a blog in Blogger.

Err... yes, but that hardly has anything to do with what I do for a living.

There are many different kinds of websites, built with different technologies, and depending on the site and the technology used to build it, they are made by one kind of professional or another. The craft of building a website comprises many different disciplines, and professionals usually specialize in just one part of the process. Although I do many different things, my specialization is mainly programming dynamic websites using Ruby and Rails.

In this article I want to

@practicingruby
practicingruby / heroes.md
Last active December 13, 2015 19:29
My Experiences with selecting Ruby Heroes

It's Ruby Hero award selection time, and I've decided this year I won't be participating. I won this award myself in 2010, and I was once a very strong supporter of the idea, so that may come as a surprise.

However, in recent years I've started to feel a few things that have shifted my perspective greatly:

  • I tend to view heroics as unsustainable and ultimately harmful in the long run to a healthy ecosystem (even though I've engaged in them plenty myself)

  • Most people I know who have had their voice greatly amplified have been worse off because of it. It would be nice to say that recognition doesn't change people's motivations, nor does it change how others perceive them, but we've got deep set cognitive biases that prevent that from being possible. This leads to weird side effects that are hard to enumerate concisely, but those who have read the book "Thinking, Fast and Slow" will know what I'm talking about.

  • The Ruby Hero awards use a selection process that was efficient an

@desandro
desandro / require-js-discussion.md
Created January 31, 2013 20:26
Can you help me understand the benefit of require.js?

I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.

From Require.js - Why AMD:

The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"

I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.


@ngauthier
ngauthier / Rakefile
Created October 25, 2012 16:32
Coffeescript building with Rake and Jasmine testing with capybara
# This is a pure rake-style build process for building coffeescript files to js
# using the coffee-script ruby gem and Rake's `rule` and `file` directives.
# That means that a js file will only be built if it is out of date.
require 'rubygems'
require 'bundler/setup'
require 'coffee-script'
require 'capybara-jasmine'
require 'capybara/poltergeist'
require 'rake/clean'
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@michaelfeathers
michaelfeathers / gist:3832740
Created October 4, 2012 10:19
Descending sort of Ruby files in a repository by number of commits
git log --name-only --no-merges | grep \.rb$ | sort | uniq -c | sort -nr
@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@xdite
xdite / 42-things.md
Created July 14, 2012 05:11
Ten (42) Things You Didn't Know Rails Could Do
@EndangeredMassa
EndangeredMassa / .bashrc
Last active October 6, 2015 08:48
Tmux Setup
alias tm="~/.tmux/tmux.sh"