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 | |
# Credit: https://git-blame.blogspot.co.il/2013/06/checking-current-branch-programatically.html | |
branch=$(git symbolic-ref --short -q HEAD) | |
if [ "$branch" != "master" ] | |
then | |
suffix="/branch/$branch" | |
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
#!/bin/bash | |
# Credit: https://gist.github.com/garystafford/07fbfe8fde48c3f5810c | |
apt-get update -yq && apt-get upgrade -yq && apt-get install -yq curl git nano | |
curl -sL https://deb.nodesource.com/setup_8.x | bash - | |
apt-get install -yq nodejs build-essential | |
npm install -g npm |
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
FROM node | |
# Create app directory | |
WORKDIR /usr/src/app | |
# Install app dependencies | |
COPY package.json . | |
# For npm@5 or later, copy package-lock.json as well | |
# COPY package.json package-lock.json . | |
RUN npm install | |
# Bundle app source | |
COPY . . |
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 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
"""A Classic FizzBuzz solution.""" | |
for i in range(1, 101): | |
if (i%3 == 0) and (i%5 == 0): | |
print "FizzBuzz" | |
elif i % 3 == 0: | |
print "Fizz" | |
elif i % 5 == 0: | |
print "Buzz" | |
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
import random | |
def whatsapp_gan_callback(message): | |
if ('פצע', 'קיא', 'פלסטר', 'לקחת', 'תולעים') in message: | |
message.respond(random.choice('שיהיה רק בריאות', 'חבל', 'אוי')) + '...' | |
else: | |
message.respond(random.choice('חחחחחחח', 'בובונים', 'מהממים', 'מדהים')) + random.choice('!!!!!', '♥', '...') | |
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
autoconf geoip json-c libspatialite proj tidy-html5 | |
automake geos lame libtiff protobuf tree | |
berkeley-db4 gettext libav libtool pstree watch | |
boost ghostscript libevent libxml2 qt5 wget | |
cairo giflib libffi little-cms2 readline wxmac | |
exiftool glib libgaiagraphics lzlib readosm x264 | |
faac gnupg libgeotiff miniupnpc sha2 xvid | |
fontconfig htop-osx liblwgeom openssl spatialindex xz | |
freetype httpie libpng ossp-uuid spatialite-gui | |
freexl imagemagick libpqxx3 pixman spatialite-tools |
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 | |
brew install tree tidy-html5 htop pstree gdal geoip \ | |
libspatialite librasterlite spatialite-gui spatialite-tools \ | |
watch spatialindex |
import datetime
now=datetime.datetime.now()
now.strftime('%Y') # '2015'
now.strftime('%Y-%m-%dT%H:%M:%S') # '2015-05-18T17:36:35'
now.strftime('%Y-%m-%d %H:%M:%S.%f') # '2015-05-18 17:36:35.119869'