Skip to content

Instantly share code, notes, and snippets.

View Mythra's full-sized avatar

Cynthia Coan Mythra

View GitHub Profile
@Mythra
Mythra / 0-defer-test.sh
Last active February 20, 2022 01:47
Defer but in bash
#!/usr/bin/env bash
set -e
source "defer.sh"
deferBashCommand() {
defer "ls -lart -hu $(pwd)"
echo "hihi!"
}
Instructure Contributor Agreement
These terms apply to your contribution of materials to a product or project owned or managed by us ('project'), and set out the intellectual property rights you grant to us in the contributed materials. The term 'us' shall mean Instructure, Inc. The term 'you' shall mean the person identified below. If this contribution is on behalf of a company, the term 'you' shall also mean the company you identify below. If you agree to be bound by these terms, fill in the information requested below and provide your signature. Read this agreement carefully before signing.
The term 'contribution' means any source code, object code, patch, tool, sample, graphic, specification, manual, documentation, or any other material posted or submitted by you to a project.
With respect to any worldwide copyrights, or copyright applications and registrations, in your contribution:
you hereby assign to us joint ownership, and to the extent that such assignment is or becomes invalid,
@Mythra
Mythra / gist:9e606bceec2820b57ab113a46beff508
Created July 18, 2017 07:22
Lib Log Normalizer Looping output Verbose
$ ./liblognorm/src/lognormalizer -r ./loop_repeat.rb -e json -p -vvv < example_repeat
liblognorm: loading rulebase file './loop_repeat.rb'
liblognorm: rulebase version is 2
liblognorm: read rulebase line[~3]: 'type=@testx:%[{"type": "literal", "text": "x="}, {"type": "char-to", "name": "..", "extradata": ";"}, {"type": "literal", "text": ";"}]%'
liblognorm: type line to add: '@testx:%[{"type": "literal", "text": "x="}, {"type": "char-to", "name": "..", "extradata": ";"}, {"type": "literal", "text": ";"}]%'
liblognorm: type name is '@testx'
liblognorm: type line to add: '%[{"type": "literal", "text": "x="}, {"type": "char-to", "name": "..", "extradata": ";"}, {"type": "literal", "text": ";"}]%'
liblognorm: ln_pdagFindType, name '@testx', bAdd: 1, nTypes 0
liblognorm: custom type '@testx' does not yet exist, adding...
error: no method named `as_slice` found for type `std::string::String` in the current scope
--> /home/CORP.INSTRUCTURE.COM/ecoan/crucible/anvil/target/debug/build/rusoto-eb5387f9e4df1a5f/out/s3.rs:19158:31
|
19158 | response.body.as_slice(),
| ^^^^^^^^
error[E0308]: mismatched types
--> /home/CORP.INSTRUCTURE.COM/ecoan/crucible/anvil/target/debug/build/rusoto-eb5387f9e4df1a5f/out/s3.rs:19192:85
|
19192 | _ => Err(UploadPartError::from_body(String::from_utf8_lossy(&response.body).as_ref()))
java.lang.ClassCastException: io.trane.future.ValueFuture cannot be cast to java.lang.Boolean
at io.trane.future.ValueFuture.flatMap(ValueFuture.java:32)
at io.trane.future.Promise$FlatMap.apply(Promise.java:467)
at io.trane.future.Continuation.flush(Promise.java:866)
at io.trane.future.Promise.flush(Promise.java:278)
at io.trane.future.Promise.becomeIfEmpty(Promise.java:237)
at io.trane.future.Promise.become(Promise.java:209)
at io.trane.future.Promise.setValue(Promise.java:342)
at io.trane.future.AsyncPromise.run(FuturePool.java:90)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
ecoan@zed:~/rundmc$ ./build.sh
Building containers
Running rundmc tests
Building rust containers...
Sending build context to Docker daemon 2.755 GB
Step 1/7 : FROM instructure/core:latest
---> 0fa4bfc5a457
Step 2/7 : MAINTAINER OPS
---> Using cache
---> 9823f4848975

Keybase proof

I hereby claim:

  • I am SecurityInsanity on github.
  • I am securityinsanity (https://keybase.io/securityinsanity) on keybase.
  • I have a public key whose fingerprint is 7F81 049A 7B7F F1F9 1A05 59B5 1FC9 1B34 FFD1 00C5

To claim this, I am signing this object:

class User < ActiveRecord::Base
before_create :set_id
def set_id
max_id = User.maximum(:id)
if id != nil
self.id = max_id.to_i + 1
else
self.id = 1