Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mathamoz on github.
  • I am mathamoz (https://keybase.io/mathamoz) on keybase.
  • I have a public key whose fingerprint is CB68 9E93 4389 A0E5 1157 64B9 95CC 8ACD C183 354F

To claim this, I am signing this object:

@mathamoz
mathamoz / test.js
Created March 14, 2016 14:22
FS Node Express
var express = require('express');
var featureswitches = require('featureswitches')('customer_key', 'environment_key');
var app = express();
featureswitches.sync();
app.get('/', function(req, res) {
featureswitches.is_enabled('world')
.then(function(result) {
@mathamoz
mathamoz / flatten
Created May 19, 2016 16:00
Simple Ruby function to recursively flatten an array and return the result
def flatten_array (arr, result=[])
arr.each do |el|
if el.is_a?(Array)
flatten_array(el, result)
else
result.push(el)
end
end
result
@mathamoz
mathamoz / IntegerOrDouble.php
Created May 27, 2016 20:18
Find if a string is a double or an integer
<?php
function integerOrDouble($val) {
if (is_numeric($val) && strpos($val, '.')) {
return 'double';
} else if (is_numeric($val)) {
return 'integer';
}
return NULL;
}

Keybase proof

I hereby claim:

  • I am mathamoz on github.
  • I am electricjbw (https://keybase.io/electricjbw) on keybase.
  • I have a public key ASCx0dq8ryby56UJZWFuyNEGjpAfDZOMCIWTEmeyZGMAowo

To claim this, I am signing this object: