Skip to content

Instantly share code, notes, and snippets.

View keeth's full-sized avatar

Keith Grennan keeth

View GitHub Profile
fileserver_backend:
- git
gitfs_provider: pygit2
gitfs_remotes:
- git@gitlab.<tld>:it/salt.git:
- privkey: /root/.ssh/id_rsa
- pubkey: /root/.ssh/id_rsa.pub
@jamiegs
jamiegs / adaptive-ecs-scaling.md
Last active November 5, 2019 00:17
Description of ECS scaling solution developed for Hudl.

Adaptive Container Scaling

Problems with AWS's recommended scaling method

  • Based on a fixed percentage of memory and CPU reservation.
  • Scaling on both cpu and memory metrics can cause the metrics to fight with each other where it'll scale out then back in and repeat.
  • If you're scaling threshold is at 80% memory, current reservation utilization is at 79% and you deploy a container that requires 25% memory, It will fail to launch.
  • ASGs are not container aware.

Solution

@mizchi
mizchi / webpack.config.js
Last active December 6, 2019 21:20
minimum webpack with babel
/*
yarn init -y
yarn add webpack webpack-cli webpack-serve html-webpack-plugin -D
yarn add babel-loader@^8.0.0-beta @babel/core @babel/preset-env -D
echo '{ "presets": ["@babel/preset-env"] }' > .babelrc
*/
const HtmlPlugin = require("html-webpack-plugin");
module.exports = {
mode: process.env.NODE_ENV || "development",
@evantahler
evantahler / buildSitemap.js
Last active December 17, 2020 16:35
35 lines to build a sitemap for next.js projects
#! /usr/bin/env node
// I am ./bin/buildSitemap.js
const path = require('path')
const glob = require('glob')
const fs = require('fs')
const SITE_ROOT = process.env.SITE_ROOT || 'https://www.actionherojs.com'
const SOURCE = process.env.SOURCE || path.join(__dirname, '..', 'pages', '/**/*.js')
const DESTINATION = process.env.DESTINATION || path.join(__dirname, '..', 'static', 'sitemap.xml')
let UserContext = React.createContext();
class App extends React.Component {
state = {
user: null,
setUser: user => {
this.setState({ user });
}
};
@cstorey
cstorey / index.html
Created February 24, 2014 22:50
A trivial clojurescript paint program using Reagent and core.async. Greatly inspired by the RxJS paint example.
<html>
<head>
<script src="out/goog/base.js" type="text/javascript"></script>
<script src="hello_world.js" type="text/javascript"></script>
<script type="text/javascript">goog.require("hello_world.core");</script>
</head>
<body>
</body>
<script type="text/javascript">hello_world.core.run()</script>
</html>
@knowbody
knowbody / ex-navigation.md
Last active July 17, 2023 10:14
My exponent's ex-navigation docs/thoughts

Exponent - ex-navigation

This is for now, for my personal use only, things might not be correctly explained here. For the official docs please check: https://github.com/exponentjs/ex-navigation/blob/master/README.md

Navigation bar configuration

On every screen you can use the built-in navigation bar, you can add a title, left button, right button or change navigation bar’s style. All you need to do is pass appropriate params to navigationBar in the route configuration:

import React, { Component } from 'react';
@siddharthsarda
siddharthsarda / custominstructions.txt
Created August 11, 2023 07:59
Jeremy Howard's custom instruction
You are an autoregressive language model that has been fine-tuned with instruction-tuning and RLHF.
You carefully provide accurate, factual, thoughtful, nuanced answers, and are brilliant at reasoning.
If you think there might not be a correct answer, you say so.
Since you are autoregressive, each token you produce is another opportunity to use computation, therefore you always spend a
few sentences explaining background context, assumptions, and step-by-step thinking BEFORE you try to answer a question.
Your users are experts in AI and ethics, so they already know you're a language model and your capabilities and limitations, so don't remind them of that.
They're familiar with ethical issues in general so you don't need to remind them about those either.