This file contains 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
return true if authorizable_obj.respond_to?(role_name) && (authorizable_obj.send(role_name) == self) |
This file contains 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
Lord, I got to ask a favor | |
And I'll hope You'll understand | |
'Cause I've lived life to the fullest | |
Let this boy die like a man |
This file contains 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
I was a little boy of 9 years old | |
The whole world in my hands | |
Trying to toss that ball across the yard | |
A game of catch with my old man | |
He would always say I’m sorry | |
Every time he had to leave | |
And I was much too young to understand | |
When he would say to me |
This file contains 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
╭─[~/sandbox]➜[xinuc@xinuc-laptop]➜[10006] | |
╰─(☹) ✘ git clone http://github.com/karthick18/inception.git | |
Initialized empty Git repository in /home/xinuc/sandbox/inception/.git/ | |
remote: Counting objects: 64, done. | |
remote: Compressing objects: 100% (64/64), done. | |
remote: Total 64 (delta 32), reused 0 (delta 0) | |
Unpacking objects: 100% (64/64), done. | |
╭─[~/sandbox]➜[xinuc@xinuc-laptop]➜[10007] | |
╰─(☺) ✘ cd inception | |
╭─[~/sandbox/inception]➜[xinuc@xinuc-laptop]➜[10008]➜ git:(master) Φ |
This file contains 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
palindrom [] = True -- empty string | |
palindrom [_] = True -- a character | |
palindrom xs = (x == y) && (palindrom middle) | |
where x = head xs | |
y = last xs | |
middle = init (tail xs) |
This file contains 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
// Generated from array.mirah | |
public class Array extends java.lang.Object { | |
private static java.util.List ary; | |
public static void main(java.lang.String[] argv) { | |
java.util.Iterator __xform_tmp_1 = null; | |
java.lang.Object a = null; | |
Array.ary = java.util.Collections.unmodifiableList(java.util.Arrays.asList(1, 2, 3, 4, 5, 6)); | |
__xform_tmp_1 = Array.ary.iterator(); | |
label1: | |
while (__xform_tmp_1.hasNext()) { |
This file contains 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
require 'digest/sha1' | |
master_password = ARGV[0] | |
domain = ARGV[1] | |
digest = Digest::SHA1.hexdigest(master_password + domain) | |
digest =~ /([^\d])/ | |
puts digest.sub($1, $1.upcase) |
This file contains 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
(doseq | |
[time (range now infinity)] | |
(loving you)) |
This file contains 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
# use colon syntax for your hashes | |
# ruby colonize.rb old_ruby_file.rb > new_ruby_file.rb | |
code = File.read ARGV[0] | |
code.scan(/\:(\S+?) =>/).each{|a| code.sub!(/:#{a.first} =>/, "#{a.first}:")} | |
puts code |
This file contains 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
xmonad.hs:33:14: | |
Couldn't match expected type `XConfig l0' | |
with actual type `xmonad-0.9.2:XMonad.Core.XConfig a0' | |
In the second argument of `($)', namely | |
`defaultConfig | |
{manageHook = manageDocks <+> manageHook defaultConfig, | |
layoutHook = avoidStruts $ layoutHook defaultConfig, | |
normalBorderColor = "#7c7c7c", focusedBorderColor = "#ffff00", | |
startupHook = setWMName "LG3D", keys = myKeys, borderWidth = 3, | |
terminal = "terminator"} |
OlderNewer