Skip to content

Instantly share code, notes, and snippets.

View Try-Try-Again's full-sized avatar
🎯
Focusing

Ryan Powell Try-Try-Again

🎯
Focusing
  • Los Angeles, CA
View GitHub Profile
$ git remote rm origin
$ git remote add origin [email protected]:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
# vim: ft=cfg
#
# This is the configuration file of "rifle", ranger's file executor/opener.
# Each line consists of conditions and a command. For each line the conditions
# are checked and if they are met, the respective command is run.
#
# Syntax:
# <condition1> , <condition2> , ... = command
#
# The command can contain these environment variables:
@Try-Try-Again
Try-Try-Again / Abstract.md
Created June 8, 2021 19:51 — forked from TimothyRHuertas/Abstract.md
Mocking React components with Sinon and QUnit.

React makes compositing components easy. However testing them can get ugly if you are not careful. Consider this example:

var ChildA = React.createClass({
    displayName: "ChildA",
    render: function(){
        return (<div>A in the house</div>);
    }
});
@Try-Try-Again
Try-Try-Again / lbForth.c
Created January 30, 2021 06:36 — forked from lbruder/lbForth.c
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@Try-Try-Again
Try-Try-Again / Ansible-Vault how-to.md
Created January 9, 2021 03:12 — forked from tristanfisher/Ansible-Vault how-to.md
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@Try-Try-Again
Try-Try-Again / Update-branch.md
Created October 16, 2020 23:16 — forked from whoisryosuke/Update-branch.md
Bring your feature branch up to date with master. Deploying from Git branches adds flexibility. Bring your branch up to date with master and deploy it to make sure everything works. If everything looks good the branch can be merged. Otherwise, you can deploy your master branch to return production to its stable state.

Updating a feature branch

First we'll update your local master branch. Go to your local project and check out the branch you want to merge into (your local master branch)

$ git checkout master

Fetch the remote, bringing the branches and their commits from the remote repository. You can use the -p, --prune option to delete any remote-tracking references that no longer exist in the remote. Commits to master will be stored in a local branch, remotes/origin/master

Proxy Performance:
Proxy Server Currently has reponse time of < 15ms with 0% error rate (New Relic)
for tests of 1 rps, 10 rps, and 100 rps
1000 rps test fails with 52.8 % error rate and response time of approx 150 ms
Service Performance:
API calls to service has response time of < 10ms with 0% error rate (New Relic)
for tests of 1 rps, 10 rps, and 100 rps
# 1 RPS
All virtual users finished
Summary report @ 21:25:07(-0800) 2020-02-23
Scenarios launched: 60
Scenarios completed: 60
Requests completed: 60
RPS sent: 1.01
Request latency:
min: 2.2
max: 24.1
# 1 RPS
All virtual users finished
Summary report @ 16:04:02(-0800) 2020-02-23
Scenarios launched: 60
Scenarios completed: 60
Requests completed: 60
RPS sent: 1.01
Request latency:
min: 2.7
max: 23
PostgreSQL:
ryan=# select * from photos where experienceid = 1000 LIMIT 1;
photoid | photourl | alt | username | experienceid
---------+-------------------------------------------------+------------+----------+--------------
11001 | https://rybnb.s3-us-west-1.amazonaws.com/40.jpg | Automotive | Alvena | 1000
(1 row)
Time: 15.333 ms