Skip to content

Instantly share code, notes, and snippets.

0 is not stdin on windows
#7 started for future.
ability to kill sudo background process
a bit of refactoring, minor improvements
A breath of fresh air
accept arbitrary size tokens
accept arbitrary types as nested error
Account for DataCenter mode while looking for hook scripts
Activity reviewing is now avaiable
actually, clear status on exit
@Fusion
Fusion / README.md
Last active April 26, 2024 08:30
Use a SSH key stored, encrypted, on a USB stick

What does this do for me?

You will be able to keep your public/private key pairs on a USB stick with a reasonable level of security.

Using this script, you will create a local ssh keystore, use it to decrypt your key, and delete it when you are done.

Platforms?

  • OS X, Linux: fully supported
  • Windows: some manual intervention required
@marcingrzejszczak
marcingrzejszczak / sc-contract-polyglot.adoc
Last active April 26, 2024 08:30
Spring Cloud Contract Polyglot Support

Spring Cloud Contract Polyglot Support

Table of contents

  • What is Contract Testing

    • different types of tests - all about fast feedback

    • end to end testing as a potential solution to integration testing

    • brittlness and slowness as a source of frustration

    • contract testing as a potential solution to the problem

  • Introduction to the maven nomenclature

@warpfork
warpfork / warpforge-api-evolution-and-recursive-expanders-in-build-plans.md
Last active April 26, 2024 08:29
warpforge evolution directions (and recursive expanders for build plans)

This is a working document to snapshot some thoughts about the evolution of Warpforge and its APIs.

Observations (that lead to some desires for changes)

  • We should seriously consider moving the Catalogs to an even yet plainer format.
    • The Catalog format as it stands today is a pain to edit manually, due to its inclusion of hashes. (This has been remarked upon by essentially every user to date.)
    • We also derive very little value from the use of hashes in the middle of the Catalog data, because in practice, we find we're continuously embedding the Catalog data in other version control systems, which already contain their own checksums. While there is elegance to having our own hashing scheme provide our own bespoke incrementally verifiable trees, there is little strong demonstration of that providing direct value (and very many demonstrations of it creating problematic friction).
    • The Catalog format seems like it could become more generally usable (and thus more appealing for others to interact
@im-knots
im-knots / sre-rampup.md
Last active April 26, 2024 08:29
SRE Projects for Rampup

SRE Intro Projects

Basics of Web Development

  1. Create a Git repository on Github or elsewhere and clone it. All of your following work must be commited regularly to this repository
  2. Create a basic web application using a modern front-end framework (Hint: npx create-react-app). Familiarize yourself with the basics of front-end web development. Learn modern Typescript, props, imports. Create multiple pages, navigation, routers. Style it. Import material-ui components. Become fluent and at ease navigating a modern web app code.
  3. Create a REST API using modern backend frameworks (Hint: Flask-Python). Connect your API to an SQL database. Write handlers to CRUD store resources of your choice in a database table. Write a test suite for your API with >90% coverage and be able to quickly run your test suite to validate everything is still working at all times. Become fluent and at ease navigating a modern backend app code.
  4. Use your web client to pull your data from your API and display it nicely. Le
@vincenttzc
vincenttzc / trainer_train_predict.py
Last active April 26, 2024 08:29
Huggingface Trainer train and predict
import numpy as np
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, recall_score, precision_score, f1_score
import torch
from transformers import TrainingArguments, Trainer
from transformers import BertTokenizer, BertForSequenceClassification
from transformers import EarlyStoppingCallback
@makaubenson
makaubenson / expert-js.md
Last active April 26, 2024 08:29
Professional javascript notes. Learnt From the best

Fundamentals of JS- Part 1

Linking external Js with HTML

  • The js file should be in the same folder as the html file
  • use <script src="./script.js"></script> to link the file

Creating Variables

-let variableName = value(int or string)

@bryfox
bryfox / Templater.js
Created May 23, 2012 01:08
One variation on simple JS templating
/*global document */
(function (ctx) {
// Simple JavaScript Templating
// John Resig - http://ejohn.org/ - MIT Licensed
(function(){
var cache = {};
function tmpl(str, data){
// Figure out if we're getting a template, or if we need to
// load the template - and be sure to cache the result.
@cho45
cho45 / sine.js
Created December 12, 2019 02:48
//#!node
const sleep = (n) => new Promise( (resolve) => setTimeout(resolve, n) );
const asciichart = require('asciichart')
const screen = {
clear: function () {
console.log('\x1b[2J');
},
@nadavrot
nadavrot / Matrix.md
Last active April 26, 2024 08:28
Efficient matrix multiplication

High-Performance Matrix Multiplication

This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).

Intro

Matrix multiplication is a mathematical operation that defines the product of