#!/bin/sh | |
runMinecraftCommand="java -Xms256M -Xmx768M -jar minecraft_server.jar nogui" | |
startScript="start.sh" | |
echo "Great let's get minecraft setup!" | |
# Sanity check, do we have java installed? | |
if ! hash java 2>/dev/null; then | |
echo "You don't have java installed. You're gonna have a tough time." | |
echo "Are you sure you selected the default Amazon Linux HVM ami?" |
''' | |
Created on May 8, 2010 by @anasimtiaz | |
Updated on May 28, 2016 by @danielwrobert | |
This is a "fork" of original script. | |
Original script URL: http://anasimtiaz.com/?p=51 | |
''' |
let regex; | |
/* matching a specific string */ | |
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello" | |
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO" | |
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes... | |
/* wildcards */ | |
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo" | |
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo" |
#!/usr/bin/env python | |
# | |
# Converting an ICS file produced by Remember the milk to a CSV file | |
# that can be read by Todoist. | |
# | |
# Bye-bye, remember the milk. Raising the annual price from $25.00 to $39.99, | |
# while stagnating with the old interface, is the way to lose your loyal pro users. | |
# | |
# This script requires icalendar, which can be installed like this: | |
# |
In python, you have floats and decimals that can be rounded. If you care about the accuracy of rounding, use decimal type. If you use floats, you will have issues with accuracy.
All the examples use demical types, except for the original value, which is automatically casted as a float.
To set the context of what we are working with, let's start with an original value.
# GET VERSION | |
npm -v (or --version) | |
# GET HELP | |
npm help | |
npm | |
# CREATE PACKAGE.JSON | |
npm init | |
npm init -y (or --yes) |
https://gist.github.com/ljharb/58faf1cfcb4e6808f74aae4ef7944cff
While attempting to explain JavaScript's reduce
method on arrays, conceptually, I came up with the following - hopefully it's helpful; happy to tweak it if anyone has suggestions.
JavaScript Arrays have lots of built in methods on their prototype. Some of them mutate - ie, they change the underlying array in-place. Luckily, most of them do not - they instead return an entirely distinct array. Since arrays are conceptually a contiguous list of items, it helps code clarity and maintainability a lot to be able to operate on them in a "functional" way. (I'll also insist on referring to an array as a "list" - although in some languages, List
is a native data type, in JS and this post, I'm referring to the concept. Everywhere I use the word "list" you can assume I'm talking about a JS Array) This means, to perform a single operation on the list as a whole ("atomically"), and to return a new list - thus making it mu
When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.
Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008
…………………………