This file contains hidden or 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 boot | |
| (require '[clojure.string :as string]) | |
| (defn- str->int [s] | |
| (Integer/parseInt s)) | |
| (defn- parse-line [line] | |
| (map str->int (string/split line #"\s+"))) |
This file contains hidden or 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 boot | |
| (require '[clojure.string :as string]) | |
| (defn- str->int [s] | |
| (Integer/parseInt s)) | |
| (defn- make-heights [s] | |
| (let [is (map str->int (string/split s #"\s+")) | |
| cs (map #(char (+ 97 %)) (range 26))] |
This file contains hidden or 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 boot | |
| (require '[clojure.string :as string]) | |
| (defn- str->int [s] | |
| (Integer/parseInt s)) | |
| (defn- round-grade [grade] | |
| (let [r (mod grade 5)] | |
| (if (>= r 3) |
This file contains hidden or 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 | |
| /** | |
| * @group example | |
| */ | |
| trait ExampleGroup | |
| { | |
| // utility methods here I guess? | |
| } |
This file contains hidden or 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
| variable "evident_account" { | |
| type = "string" | |
| } | |
| variable "evident_id" { | |
| type = "string" | |
| } | |
| data "aws_iam_policy_document" "evident" { | |
| statement { |
This file contains hidden or 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 | |
| use Symfony\Component\HttpKernel\Kernel; | |
| class AppKernel extends Kernel | |
| { | |
| public static function fromEnvironment() | |
| { | |
| $env = getenv('APP_ENVIRONMENT') ?: 'prod'; | |
| $debug = filter_var(getenv('APP_DEBUG'), FILTER_VALIDATE_BOOLEAN); |
This file contains hidden or 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 | |
| add_filter('page_template', function ($template) { | |
| $page = get_queried_object(); | |
| $slugs = []; | |
| do { | |
| $slugs[] = $page->post_name; | |
| $page = empty($page->post_parent) ? null : get_post($page->post_parent); | |
| } while ($page); |
This file contains hidden or 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 | |
| /** | |
| * Child theme's function.php. This is loaded *before* the parent theme's so you can | |
| * unhook things here as you wish. See: https://github.com/WordPress/WordPress/blob/e9dbea9aac6300550f1637cda24948df65752a68/wp-settings.php#L366-L369 | |
| * | |
| * STYLESHEETPATH === child theme path | |
| * TEMPLATEPATH === parent theme path | |
| * | |
| * For example, in Ribosome https://wordpress.org/themes/ribosome/ say you didn't like the way |
This file contains hidden or 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 | |
| use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; | |
| use Acme\Example\Auth\AppUser; | |
| /** | |
| * Replaces the `date` filter with one that uses the user's timezone if a | |
| * user is present. | |
| */ | |
| final class TimeZoneExtension extends \Twig_Extension |
This file contains hidden or 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 | |
| // The return type of a method, imagine this is a | |
| // nice value object. | |
| final class Foo | |
| { | |
| } | |
| // interface that returns a `Foo` value object | |
| interface Bar |