UNIX(-like)es(FreeBSD, Linux, Solaris, AIX), Mac OS X
- Scala
| use Illuminate\Database\Capsule\Manager as Capsule; | |
| $capsule = new Capsule; | |
| // DB毎の情報 | |
| $capsule->addConnection(array( | |
| 'driver' => '', | |
| 'host' => '', | |
| 'database' => '', | |
| 'username' => '', | |
| 'password' => '', |
| <?xml version="1.0"?> | |
| <root> | |
| <list> | |
| <item> | |
| <name>LeaveInsMode with EISUU(Terminal)</name> | |
| <identifier>private.app_terminal_esc_with_eisuu</identifier> | |
| <only>TERMINAL</only> | |
| <autogen>__KeyToKey__ KeyCode::ESCAPE, KeyCode::ESCAPE, KeyCode::JIS_EISUU</autogen> | |
| <autogen>__KeyToKey__ KeyCode::BRACKET_LEFT, ModifierFlag::CONTROL_L, KeyCode::ESCAPE, KeyCode::JIS_EISUU</autogen> | |
| <autogen>__KeyToKey__ KeyCode::C, ModifierFlag::CONTROL_L, KeyCode::ESCAPE, KeyCode::JIS_EISUU</autogen> |
| import scalaz.stream.{async,Process} | |
| import scalaz.concurrent.Task | |
| /** | |
| * Try running the process `p`, retrying in the event of failure. | |
| * Example: `retry(Process.awakeEvery(2 minutes))(p)` will wait | |
| * 2 minutes after each failure before trying again, indefinitely. | |
| * Using `retry(Process.awakeEvery(2 minutes).take(5))(p)` will do | |
| * the same, but only retry a total of five times before raising | |
| * the latest error. |
| / # apk add -vvv jemalloc-dev | |
| The following NEW packages will be installed: | |
| jemalloc jemalloc-doc jemalloc-dev | |
| After this operation, 1112 KiB of additional disk space will be used. | |
| (1/3) Installing jemalloc (3.6.0-r1) | |
| usr/ (dir) | |
| usr/lib/ (dir) | |
| usr/lib/libjemalloc.so.1 | |
| (2/3) Installing jemalloc-doc (3.6.0-r1) | |
| usr/ (dir) |
| // array utils | |
| // ================================================================================================= | |
| const combine = (...arrays) => [].concat(...arrays); | |
| const compact = arr => arr.filter(Boolean); | |
| const contains = (() => Array.prototype.includes | |
| ? (arr, value) => arr.includes(value) | |
| : (arr, value) => arr.some(el => el === value) |
| #!/bin/bash | |
| # Author: Erik Kristensen | |
| # Email: erik@erikkristensen.com | |
| # License: MIT | |
| # Nagios Usage: check_nrpe!check_docker_container!_container_id_ | |
| # Usage: ./check_docker_container.sh _container_id_ | |
| # | |
| # The script checks if a container is running. | |
| # OK - running |
| package gnieh.tex | |
| import scala.language.higherKinds | |
| /** A generic monadic interface. By implementing this trait, one can use | |
| * this data together in for-comprehensions | |
| * | |
| * @author Lucas Satabin | |
| */ | |
| trait Monadic[+T, M[+T] <: Monadic[T, M]] { |
| API | Status Codes |
|---|---|
| [Twitter][tw] | 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504 |
| [Stripe][stripe] | 200, 400, 401, 402, 404, 429, 500, 502, 503, 504 |
| [Github][gh] | 200, 400, 422, 301, 302, 304, 307, 401, 403 |
| [Pagerduty][pd] | 200, 201, 204, 400, 401, 403, 404, 408, 500 |
| [NewRelic Plugins][nr] | 200, 400, 403, 404, 405, 413, 500, 502, 503, 503 |
| [Etsy][etsy] | 200, 201, 400, 403, 404, 500, 503 |
| [Dropbox][db] | 200, 400, 401, 403, 404, 405, 429, 503, 507 |
| # Set project-wide metadata | |
| gcloud compute project-info add-metadata --metadata foo=bar,baz=bat | |
| # Query set metadata based on a key | |
| curl 'http://metadata/computeMetadata/v1/project/attributes/foo' -H 'Metadata-Flavor: Google' # => bar |