Skip to content

Instantly share code, notes, and snippets.

View frewsxcv's full-sized avatar
🇵🇸

Corey Farwell frewsxcv

🇵🇸
View GitHub Profile
var key;
for (key in myobj) {
if (myobj.hasOwnProperty(key)) {
console.log(key, myobj[key]);
}
}
//////////////////////////////////////
func update(a string, b string) (error) {
return foo := model.MethodA(a)
|| bar := model.MethodB(b)
|| model.CheckStuffA(foo, bar)
|| model.CheckStuffB(foo, bar)
|| model.Update(foo, bar)
}
function LetterCountI(str) {
str = str.split(" ");
var answer = "";
var mostRep = 1;
for (i = 0; i < str.length; i++)
if (eachWord(str[i]) > mostRep) {
mostRep = eachWord(str[i]);
answer = str[i];
}
if (mostRep === 1)
extern crate afl;
extern crate regex;
fn main() {
afl::read_stdio_string(|string| {
let mut split = string.split('\n');
let s1 = match split.next() {
Some(s) => s,
None => return,
### Keybase proof
I hereby claim:
* I am frewsxcv on github.
* I am corey (https://keybase.io/corey) on keybase.
* I have a public key ASDSf2dQ_6_LFKPzBvssH82uSaiFV_PgXfy9L-4Qv_NAWQo
To claim this, I am signing this object:
@frewsxcv
frewsxcv / datadog_tracing_stripe.rb
Created February 6, 2020 13:57
Stripe + Datadog Tracing integration
module Stripe::APIOperations::Request::ClassMethods
old_request = instance_method(:request)
define_method(:request) do |*args|
span = Datadog.tracer.trace('stripe.request', span_type: 'http')
begin
result = old_request.bind(self).call(*args)
rescue Stripe::StripeError => e
span.set_error(e)