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
{ | |
"name": "WEB APP NAME", | |
"short_name": "WEB APP", | |
"start_url": "/" | |
} |
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
class ImageDimensionsValidator < ActiveModel::EachValidator | |
CHECKS = { greater_than: :>, greater_than_or_equal_to: :>=, | |
equal_to: :==, less_than: :<, less_than_or_equal_to: :<= }.freeze | |
SIDES = [:width, :height].freeze | |
def validate_each(record, attribute, value) | |
dimensions = Paperclip::Geometry.from_file(value.queued_for_write[:original].path) | |
SIDES.each do |side| |
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 strict; | |
use warnings; | |
sub kiyoshi { | |
my @zd = my ($z, $d) = ('ズン', 'ドコ'); | |
my $str = join('', (my @kys = ($z, $z, $z, $z, $d))); | |
my $cnt = 0; | |
my @word; | |
while ( join('', @word) ne $str ) { |
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
perl -e 'chomp($c=scalar(`stty size`));$c=int(${[split(/\s/, $c)]}[1]);$s=pack("H*","e5bdbce5a5b3");print "\e[2J";while(1){$a{rand $c}=0;for $x (keys %a){$y=$a{$x}++;print sprintf("\e[%d;%dH \e[%d;%dH \e[%d;%dH \e[%d;%dH%s \e[0;0H",$y,$x,$y,$x+1,$y,$x+2,$a{$x},$x,$s)}local $|=1;select $u,$u,$u,0.2}' |
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
$ ruby -e 'C=`stty size`.scan(/\d+/)[1].to_i;S="\u5f7c\u5973";a={};puts "\033[2J";loop{a[rand(C)]=0;a.each{|x,o|;a[x]+=1;print "\033[#{o};#{x}H \033[#{a[x]};#{x}H#{S} \033[0;0H"};$stdout.flush;sleep 0.1}' |