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
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 / bundler_network_error_report.md
Last active May 25, 2020 02:20
Bundler Network Error Report
  • What you're trying to accomplish?

    Bundle new gems

  • The command you ran

    ➜ bundle

  • What you expected to happen?

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
@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
@tundal45
tundal45 / command
Created July 16, 2012 19:03
Get just the ascii middle finger in command line from http://ascii-middle-finger.com/
curl -s http://ascii-middle-finger.com/ | grep -A 10 '<pre>' | grep -v 'pre'
@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
commit b242bf4e453f1a91703f006e9239ab0168256dd7
Author: bglusman <brian@enjyn.com>
Date: Sun Mar 18 22:21:08 2012 -0400
wiki methods on course and dryer path creation/use
diff --git a/app/models/course.rb b/app/models/course.rb
index baee48c..a98f0e3 100644
--- a/app/models/course.rb
+++ b/app/models/course.rb
@tundal45
tundal45 / gpush.sh
Created March 23, 2012 01:37
This is what Geoff Massanek (https://github.com/gmassanek) & I hacked on to open the pull request URL on git push (using alias).
function current_git_branch {
git symbolic-ref HEAD | sed 's/refs\/heads\///'
}
# Assumes GIT URLS. No support for HTTPS
function git_repo_url {
git config --get remote.origin.url | sed 's/git@/https:\/\//' | sed 's/com:/com\//' | sed 's/.git$//'
}
function open_branch_url {
@tundal45
tundal45 / unix_books.md
Created February 20, 2012 20:03
This is a list of UNIX books that one should have around to get better at UNIX. The initial list below is started with recommendations from [Avdi Grimm](twitter.com/avdi). The idea is to have more people recommend books that need to be added to the list.
git clone git@github.com:jduan/s10-int.git jduan-s10-intCloning into jduan-s10-int...
remote: Counting objects: 117, done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 117 (delta 71), reused 117 (delta 71)
Receiving objects: 100% (117/117), 14.10 KiB, done.
Resolving deltas: 100% (71/71), done.
➜ mendicant cd jduan-s10-int
➜ jduan-s10-int git:(master) ls
README.md