Skip to content

Instantly share code, notes, and snippets.

View kranthikumar's full-sized avatar

jajula kranthikumar

  • University of oklahoma
  • norman
View GitHub Profile
@kranthikumar
kranthikumar / replify
Created August 19, 2016 16:36 — forked from postpostscript/ replify
replify - Create a REPL for any command
#!/bin/sh
command="${*}"
printf "Initialized REPL for [%s]\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
do
eval "$command $input"
printf "\n%s> " "$command"
@kranthikumar
kranthikumar / springer-free-maths-books.md
Created December 28, 2015 15:36 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links

Tutorials

;; Prevent the cursor from blinking
(blink-cursor-mode 0)
;; Don't use messages that you don't read
(setq initial-scratch-message "")
(setq inhibit-startup-message t)
;; Don't let Emacs hurt your ears
(setq visible-bell t)
;; You need to set `inhibit-startup-echo-area-message' from the
;; customization interface:
@kranthikumar
kranthikumar / securing_rails_updates.md
Created March 5, 2012 16:40 — forked from peternixey/securing_rails_updates.md
How Homakov hacked GitHub and how to protect your application

##How Homakov hacked GitHub and the line of code that could have prevented it


Please note: THIS ARTICLE IS NOT WRITTEN BY THE GITHUB TEAM or in any way associated with them. It's simply hosted as a Gist because the markdown formatting is excellent and far clearer than anything I could manage on my personal Tumblr at peternixey.com.

If you'd like to follow me on twitter my handle is @peternixey


class PostsController < ActionController::Base
def create
Post.create(post_params)
end
def update
Post.find(params[:id]).update_attributes!(post_params)
end
private