Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
I hereby claim:
- I am ajamaica on github.
- I am ajamaica (https://keybase.io/ajamaica) on keybase.
- I have a public key whose fingerprint is 0372 0E83 FFF7 AA05 E537 D828 FA2D 63E3 45C2 BD8E
To claim this, I am signing this object:
I hereby claim:
- I am ajamaica on github.
- I am ajamaica (https://keybase.io/ajamaica) on keybase.
- I have a public key whose fingerprint is 9021 115C 215C 1F17 36E2 D338 14A5 450C 7363 D3D8
To claim this, I am signing this object:
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
curl -sL https://deb.nodesource.com/setup_5.x -o nodesource_setup.sh | |
sudo -E bash ./nodesource_setup.sh | |
sudo apt-get install -y nodejs build-essential git | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 | |
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org | |
sudo service mongod start | |
git clone https://github.com/ParsePlatform/parse-server-example.git |
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
import string | |
#!/usr/bin/env python | |
def ransom_note(revistas,ransom): | |
catalogo = dict() | |
for letra in revistas: | |
if not letra in catalogo.keys(): | |
catalogo[letra] = 1 | |
else: |
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
public static void setListViewHeightBasedOnChildren(ListView listView) | |
{ | |
ListAdapter listAdapter = listView.getAdapter(); | |
if(listAdapter == null) return; | |
if(listAdapter.getCount() <= 1) return; | |
int desiredWidth = MeasureSpec.makeMeasureSpec(listView.getWidth(), MeasureSpec.AT_MOST); | |
int totalHeight = 0; | |
View view = null; | |
for(int i = 0; i < listAdapter.getCount(); i++) |
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
[ | |
{ | |
"__type__": "LevelPost", | |
"code": "5565-0000-006F-C737", | |
"pictures": [], | |
"timestamp": 1443726849.0, | |
"title": "My boyfriend made a couple of levels. He's really into storytelling and not typically a fan of platformers, so his way of putting a level together is quite interesting.", | |
"url": "https://www.reddit.com/r/MarioMaker/comments/3n4z2d/my_boyfriend_made_a_couple_of_levels_hes_really/" | |
}, | |
{ |
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
public static void setListViewHeightBasedOnChildren(ListView listView) { | |
ListAdapter listAdapter = listView.getAdapter(); | |
if (listAdapter == null) { | |
// pre-condition | |
return; | |
} | |
int totalHeight = listView.getPaddingTop() + listView.getPaddingBottom(); | |
for (int i = 0; i < listAdapter.getCount(); i++) { | |
View listItem = listAdapter.getView(i, null, listView); |
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
#palabras = ["nintendo","xbox","wii u","playstation 4"] | |
#for palabra in palabras : | |
# print palabra, len(palabra) | |
#for i in range(-100,1001): | |
# print "No - %i" % i | |
palabras = ["nintendo","xbox","wii u","playstation 4"] | |
for palabra in palabras : | |
print palabra |
NewerOlder