Given an array of words, write a method to output matching sets of anagrams. Words include "rates, rat, stare, taser, tears, art, tabs, tar, bats, state"
- GitHub Staff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin | |
# This is a quick bash script to grab the top 1 mil alexa urls and drop then in redis. | |
# Alexa limits the request to 50 per second and 100 per request. This can get expensive quickly so we only pull what you need. | |
# Set the initial startpoint var to 1 and increment by 100 with each group collected | |
# multiple sidekiq jobs can be set up pull many chunks at once | |
# To set/create the initial startpoint - before the first collection begins | |
# redis-cli SET startpoint 1 |
Returns a serialized (url encoded) representation of an array or object for use in URL query string or Ajax request, without jQuery.
function param(obj) {
let result = '';
for (let key of Object.keys(obj)) {
// if obj[key] is an object dig deeper
Sometimes you need to excluded a modified file from your git commit. There are a few ways to do this, my preference is this.
To ignore a single file that is already versioned:
git update-index --assume-unchanged "folder/folder/filename.foo"
Then you can complete your commit normally.
sh (git commit -am "")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker --version | |
sudo su | |
echo deb https://apt.dockerproject.org/repo ubuntu-`cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d'=' -f2` main >> /etc/apt/sources.list.d/docker.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F76221572C52609D | |
apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a simple example of how you can add pagination to an AngularJS view. | |
You can see it work here: | |
https://jsfiddle.net/tinabme/qdp6abg3/18/ |