Skip to content

Instantly share code, notes, and snippets.

View javiermendozain's full-sized avatar
💭
FullStack Developer

Javier Mendoza javiermendozain

💭
FullStack Developer
View GitHub Profile
@javiermendozain
javiermendozain / starttmux.sh
Created September 18, 2020 23:05 — forked from todgru/starttmux.sh
Start up tmux with custom windows, panes and applications running
#!/bin/sh
#
# Setup a work space called `work` with two windows
# first window has 3 panes.
# The first pane set at 65%, split horizontally, set to api root and running vim
# pane 2 is split at 25% and running redis-server
# pane 3 is set to api root and bash prompt.
# note: `api` aliased to `cd ~/path/to/work`
#
session="work"
@javiermendozain
javiermendozain / max-consecutive-ones-solution
Created July 31, 2020 19:08
Solution of LeetCode, Max Consecutive Ones Solution: given a binary array, find the maximum number of consecutive 1s in this array.
/**
* @param {number[]} nums
* @return {number}
*/
var findMaxConsecutiveOnes = function(nums) {
let count = 0 ;
let accum = 0;
for(const num of nums) {
if (num === 1) {
@javiermendozain
javiermendozain / Trie.js
Created July 27, 2020 00:24 — forked from tpae/Trie.js
Trie.js - super simple JavaScript implementation
// Trie.js - super simple JS implementation
// https://en.wikipedia.org/wiki/Trie
// -----------------------------------------
// we start with the TrieNode
function TrieNode(key) {
// the "key" value will be the character in sequence
this.key = key;
@javiermendozain
javiermendozain / media-query.css
Created July 8, 2020 16:48 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
import 'package:flutter/material.dart';
import 'dart:math';
const SCALE_FRACTION = 0.7;
const FULL_SCALE = 1.0;
const PAGER_HEIGHT = 200.0;
class ItCrowdPage extends StatefulWidget {
@override
_ItCrowdPageState createState() => _ItCrowdPageState();