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
@tundal45
tundal45 / foo.rb
Created June 6, 2012 21:53
How do I test if something is called in a rescue block?
class FooClass
def bar
baz
rescue StandardError => e
qux
raise
end
def baz
end
@tundal45
tundal45 / commands
Created October 11, 2012 14:53
How to enable NTFS files on a mac
➜ brew install ntfs-3g
➜ brew install fuse4x
# Follow steps the above commands tell you to follow
➜ brew info fuse4x-kext
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});

This is the list of programming concepts that Hacker School students have identified as scary. It was originally tweeted in image form by Alex Payne.

What scares us about Programming?

  • Low-level errors
  • Measuring performance
  • Deleting code
  • Getting out of IDEs (Xcode)
  • Unable to build it from scratch
  • Having to copy and paste code that I could not write myself
def get_grade(array)
sum = 0
array.each do |x|
sum += x
end
average = sum / array.length
case average
when 90...100
grade = 'A'
when 80...90
@tundal45
tundal45 / podcasts.md
Last active December 27, 2015 09:39 — forked from lmarburger/podcasts.md
Below is a subset of podcasts that I am currently subscribed to. I have broken them down to ones that I listen to every episode, even if it means I have to catch up & others that I only listen to selected episodes. I seem to update the list every time myself or someone on twitter is looking for a new podcast recommendation.
@tundal45
tundal45 / :(
Created November 11, 2013 17:42
ExecJS::ProgramError in Jasmine_rails/spec_runner#index
Showing /../gems/jasmine-rails-0.4.9/app/views/layouts/jasmine_rails/spec_runner.html.erb where line #12 raised:
Error: Parse error on line 2: Unexpected '->'
(in ../spec/javascripts/dashboard_spec.coffee)
Extracted source (around line #12):
9: <body>
10: <div id="jasmine_content"></div>
@tundal45
tundal45 / what_can_we_do.md
Last active December 31, 2015 20:19
This is an attempt to start a public discussion about how technologists can do better to provide real value & change the world for the better.

I am co-opting a question Mathias Meyer asked on twitter. The question, from what I can tell, came after reading the latest on Silicon Valley Myopia/Self-Centeredness. We in the tech industry, myself included, seem to have traded opportunities to use technologies that we love to solve non-problems or create more in the process.

Mike Montiero, who is the author of one of the articles that Mathias links to, also did a fantastic talk at Webstock which I encourage everyone to watch. Though the title might make it sound specific to designers, what I took away from the talk was that everyone that is involved in the product design process should be the biggest advocate of the users. If what's best for the users diverges from what's best for the product or the company, then it's a good sign that you are not solving the right problem

@tundal45
tundal45 / keybase.md
Created March 3, 2016 20:58
keybase.md

Keybase proof

I hereby claim:

  • I am tundal45 on github.
  • I am tundal45 (https://keybase.io/tundal45) on keybase.
  • I have a public key ASBbGni76NoHi-VsPkFbixCFmgg7h3emGc7DySRC6DrcWAo

To claim this, I am signing this object:

@tundal45
tundal45 / components.button-with-state.js
Last active January 12, 2017 23:43
button-with-states
import Ember from 'ember';
const { $, Component, computed, observer, RSVP, run } = Ember;
const STATES = {
activating: {
label: 'Activating',
classNames: 'in-progress disabled',
disabled: true
},
error: {