I hereby claim:
- I am radiumrasheed on github.
- I am radiumrasheed (https://keybase.io/radiumrasheed) on keybase.
- I have a public key ASComMcs9ZUOEWPOBdqcsg_lyLQvtoL5LhufIinipke1hAo
To claim this, I am signing this object:
Array.implement('batch', function(callback, loopsPerBatch, delay, bind) { | |
if(!loopsPerBatch) loopsPerBatch = 10; | |
if(!delay) delay = 50; | |
if(callback) { | |
var loops = 0, | |
index = 0, | |
that = this; | |
function doLoops() { | |
loops = 0; | |
for (var length = that.length; (index < length) && loops < loopsPerBatch; index++) { |
import "regenerator-runtime/runtime"; | |
import { useState } from "react"; | |
import { useAsyncDebounce } from "react-table"; | |
const ColumnFilter = ({ column }) => { | |
const { filterValue, setFilter } = column; | |
const [value, setValue] = useState(filterValue); | |
const onChange = useAsyncDebounce((value) => { | |
setFilter(value || undefined); | |
}, 300); |
const solution = (arr) => { | |
if (!arr) return ""; | |
if (arr.length === 0) return ""; | |
const sum = (arr, idx) => { | |
if (idx - 1 < arr.length) { | |
if (arr[idx - 1] === -1) return 0; | |
return arr[idx - 1] + sum(arr, idx * 2) + sum(arr, idx * 2 + 1); | |
} | |
return 0; | |
}; |
import { Injector } from '@angular/core'; | |
export class AppInjector { | |
private static injector: Injector; | |
static setInjector(injector: Injector) { | |
AppInjector.injector = injector; | |
} |
I hereby claim:
To claim this, I am signing this object:
I build things with code
<RoutingRules> | |
<RoutingRule> | |
<Condition> | |
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> | |
</Condition> | |
<Redirect> | |
<ReplaceKeyPrefixWith>#/</ReplaceKeyPrefixWith> | |
<HttpRedirectCode>302</HttpRedirectCode> | |
</Redirect> | |
</RoutingRule> |
config = require 'config' | |
s3 = require 's3' | |
q = require 'q' | |
module.export = (oldKey, newKey) -> | |
defer = q.defer() | |
params = | |
# you need to set the s3 bucket in the CopySource key | |
CopySource: "#{ config.s3.bucket }/#{ oldKey }" |
'use strict'; | |
const NODE_ENV = process.env.NODE_ENV || 'development'; | |
const CloudWatchTransport = require('winston-aws-cloudwatch'); | |
const Winston = require('winston'); | |
let transport; | |
if (NODE_ENV === 'development') { | |
transport = new Winston.transports.Console({ | |
format: Winston.format.combine( |
const arr = ['mom', 'dad', 'abcde', 'racecar', 'momom']; | |
function namePalindrome(arr) { | |
return arr.filter((curr, idx, arr) => { | |
const splitArr = curr.split(''); | |
const reversedString = splitArr.reduceRight((prev, curr) => ( prev + curr ), ''); | |
if (curr === reversedString) return curr; | |
}) | |
} |