Skip to content

Instantly share code, notes, and snippets.

View bradtaniguchi's full-sized avatar
😌
Developing

Brad bradtaniguchi

😌
Developing
View GitHub Profile
{
"message":"",
"nodeResponse":[
{ },
{ },
{
"_id":"574f452d43052a23f8a22c68",
"description":"Notification Mode Catalog",
"name":"Notification Mode",
"list":[
@bradtaniguchi
bradtaniguchi / transfer-array.js
Last active August 16, 2017 23:05
Transfer items between two arrays.
const arr1 = [
{
name: 'item 1',
selected: true
},
{
name: 'item 2',
selected: true
},
{
git config --global core.editor "vim"" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
execute pathogen#infect()
" Turn on syntax highlighting
syntax on
db.getCollection('form').aggregate([
{
"$match": {
"_id": ObjectId("5a27217436a3d3022e1277c9")
}
},
{
"$unwind": "$views"
},
{
Current Body:
{
"userId" : "abc545646545646546545"
}
Option I - Proposal:
[
class HelloWorld
{
// arguments are passed using the text field below this editor
public static void main(String[] args)
{
OtherClass myObject = new OtherClass("Hello World!");
thisMyClassNow poop = new thisMyClassNow();
System.out.println(myObject);
System.out.println(poop);
}
@bradtaniguchi
bradtaniguchi / GitCommitEmoji.md
Created April 10, 2018 00:48 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@bradtaniguchi
bradtaniguchi / new-year-chaos.js
Created December 4, 2018 21:55
A programming challenge
///https://www.hackerrank.com/challenges/new-year-chaos/problem?h_l=interview&playlist_slugs%5B%5D=interview-preparation-kit&playlist_slugs%5B%5D=arrays
const assert = require('assert');
const throwErr = num => {
throw new Error(num);
};
const minBribes = arr =>
arr.reduce(
(bribes, num, index) => {
if (index + 1 < num - 2) {
@bradtaniguchi
bradtaniguchi / prettier-html-formatting-workaround.json
Created January 15, 2019 02:19
This is how I work around formatting issues with prettier, I don't use it and use beautify instead
{
// use this as a workaround for prettier
"beautify.language": {
"html": [
"htm",
"html"
]
},
"prettier.disableLanguages": ["html"],
}
@bradtaniguchi
bradtaniguchi / get-character-with-highest-count.js
Last active September 18, 2019 20:42
Quick function that returns the character with the highest count from the string.
/**
* Returns the character seen the most in the string
*/
const getCharacterWithHighestCount = str =>
Array.from(
str
.split('')
.reduce(
(map, char) =>
map.has(char)