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 | |
namespace Some\Library; | |
interface LibraryException { } | |
class InvalidArgumentException extends \InvalidArgumentException implements LibraryException | |
{ | |
// ... | |
} |
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 ubuntu:16.04 | |
RUN apt-get update -y && apt-get -y install openssh-client |
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 declare(strict_types=1); | |
/* | |
* This file is part of pmg/core | |
* | |
* Copyright (c) PMG <https://www.pmg.com>. | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source 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
#!/usr/bin/env python3 | |
import argparse | |
import http.client as http | |
import os | |
import boto3 as aws | |
def _parse_args(args=None): | |
p = argparse.ArgumentParser(description='Update a hostname record in route53 with the current IP address') | |
p.add_argument('zone_id', help='The DNS zone id to update') |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "DenyUnEncryptedOPutObject", | |
"Effect": "Deny", | |
"Principal": "*", | |
"Action": "s3:PutObject", | |
"Resource": "arn:aws:s3:::BUCKET_NAME/*", | |
"Condition": { |
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
script: | |
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then ./bin/dev/fixcs; fi' |
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
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import { BrowserRouter, Route, Switch } from 'react-router-dom'; | |
function App({ children }) { | |
return <div>{children}</div>; | |
} | |
function Home() { | |
return <p>Hello, World</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
#!/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 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 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) |