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
<html> | |
<head> | |
<link rel="stylesheet" href="https://gist.github.com/stylesheets/gist/embed.css"/> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script type="text/javascript" src="https://raw.github.com/gist/1064493/gisthere.js"></script> | |
</head> | |
<body> | |
↓↓↓ gist here! ↓↓↓ | |
<hr/> | |
<a href="https://raw.github.com/gist/1064493/gisthere.js">gisthere.js</a> |
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; | |
my @t = map { {'v' => $_} } split //, "114152264215"; | |
for my $i (0..$#t) { | |
$t[$i]{'i'} = $i; | |
my $ni = $i + $t[$i]{'v'}; | |
$ni -= @t if ($ni >= @t); | |
my $pi = $i - $t[$i]{'v'}; | |
$ni += @t if ($ni < 0); | |
$t[$i]{'n'} = $t[$ni]; |
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
for n in {1..10}; do; say -r 1 -v Ralph deeeeeeeeeeeattttth &; done |
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 User < ActiveRecord::Base | |
validates :email, | |
presence: true, | |
format: { with: VALID_EMAIL_REGEX }, | |
uniqueness: { case_sensitive: false } | |
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
<?php | |
/** | |
* Place this file in CakePHP's root dir and do: | |
* $ php -S localhost:8080 builtin-server.php | |
* with PHP5.4 | |
*/ | |
if (strpos($_SERVER['REQUEST_URI'], '?')) { | |
list($path, $param) = preg_split('/\?/', $_SERVER['REQUEST_URI'], 2); | |
} else { | |
$path = $_SERVER['REQUEST_URI']; |
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
FROM ruby:2.7.1-alpine3.11 AS base | |
ENV LANG="C.UTF-8" | |
ENV RUNTIME_LIBS="mariadb-connector-c tzdata" | |
ENV BUILD_LIBS="build-base mariadb-connector-c-dev" | |
ENV WORKSPACE="/opt/app/src" | |
RUN mkdir -p $WORKSPACE && \ | |
apk add --no-cache $RUNTIME_LIBS |