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
@mixin triangle($size, $color, $direction) { | |
width: 0; | |
height: 0; | |
@if $direction == 'up' { | |
border-left: $size solid transparent; | |
border-right: $size solid transparent; | |
border-bottom: $size solid $color; | |
} @elseif $direction == 'down' { | |
border-left: $size solid transparent; |
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
module ActionDispatch | |
class ExceptionWrapper | |
@@rescue_responses.merge!('Pundit::NotAuthorizedError' => :forbidden) | |
end | |
end |
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 'date' | |
def palindate?(date) | |
padded_month = "%02d" % date.month | |
padded_day = "%02d" % date.day | |
both_pad = "#{padded_month}#{padded_day}#{date.year}" | |
month_pad = "#{padded_month}#{date.day}#{date.year}" | |
day_pad = "#{date.month}#{padded_day}#{date.year}" |
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
int main(int argc, char **argv) { | |
size_t rows = atoi(argv[1]); | |
size_t columns = atoi(argv[2]); | |
/* This is really cool!!! */ | |
int (*matrix)[columns] = malloc(sizeof(*matrix) * rows); | |
if (matrix) { | |
matrix[0][0] = 13; | |
matrix[1][0] = 1; |
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 'pp' | |
class BasicBlock | |
include Enumerable | |
attr_accessor :instructions, :children | |
def initialize(&block) | |
@instructions = [] | |
@children = [] |
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
#!/usr/bin/env ruby | |
require 'pp' | |
if ARGV[0] | |
# Collect defines. | |
defines = {} | |
Dir.glob("#{ARGV[0]}/**/*.{c,h}") do |path| | |
File.open(path, "r") do |file| |
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
;; Credit Eli Barzilay | |
(λ(f)(λ | |
(x)(((x(λ( | |
x)(λ(x y)y) | |
)(λ(x y)x))( | |
x(λ(x)(λ(x y) | |
y))(λ(x y | |
)x))((( | |
x(λ(p)( |
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
;; A macro that defines a PDA language | |
(define-syntax pushdown | |
(syntax-rules (: ->) | |
[(pushdown init-state end-state | |
[state : (input-stream input-stack -> new-state new-stack) ...] | |
...) | |
(lambda (string) | |
(: state : (Listof Token) (Listof Token) -> Boolean) | |
... | |
(define (state stream stack) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ANSIBrightBlackColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS | |
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw | |
LjQ1ODgyMzU2MTcgMC40NDMxMzcyODgxIDAuMzY4NjI3NDU4OAAQAoAC0hAREhNaJGNs | |
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp |
OlderNewer