C:\src\github>express aws-express-dynamodb-sample
destination is not empty, continue? [y/N] y
create : aws-express-dynamodb-sample
create : aws-express-dynamodb-sample/package.json
create : aws-express-dynamodb-sample/app.js
create : aws-express-dynamodb-sample/public
create : aws-express-dynamodb-sample/public/javascripts
create : aws-express-dynamodb-sample/routes
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
"""Script to add up minutes:seconds and give average pace""" | |
def sum_times(*times): | |
'''arg list of MM:SS''' | |
return sum(map(lambda x: int(x.split(':')[0]) * 60 + int(x.split(':')[1]), times)), len(times) | |
def secs_to_mins(seconds, count): |
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 __future__ import with_statement | |
import csv | |
import re | |
""" | |
Parse a CSV file with multiple column counts | |
e.g., foo_1, foo_2 | |
The result will be a single column, foo |
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
//debugging task to check the configuration | |
task list(dependsOn: configurations.compile) << { | |
println "classpath = ${configurations.compile.collect {File file -> file.name}}" | |
} | |
//debug -- show all dependency files | |
task showDependencyFiles(dependsOn:configurations.compile) { | |
configurations.compile.collect { | |
println it | |
} |
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
fun main(args : Array<String>) { | |
println(System.getProperty("os.name")) | |
println(System.getProperty("os.arch")) | |
println(System.getProperty("os.version")) | |
} |
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 shutil | |
import os | |
import stat | |
def remove_readonly(func, path, excinfo): | |
os.chmod(path, stat.S_IWRITE) | |
func(path) | |
shutil.rmtree("../../export", onerror=remove_readonly) |
C:\src\github>express aws-express-dynamodb-sample destination is not empty, continue? [y/N] y
create : aws-express-dynamodb-sample create : aws-express-dynamodb-sample/package.json create : aws-express-dynamodb-sample/app.js create : aws-express-dynamodb-sample/public create : aws-express-dynamodb-sample/public/javascripts create : aws-express-dynamodb-sample/routes create : aws-express-dynamodb-sample/routes/index.js
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 java.time.Duration | |
import java.time.LocalDateTime | |
import java.time.format.DateTimeFormatter | |
/** | |
* Dates | |
*/ | |
fun futureDate(days : Int) : String { | |
val currentDateTime : LocalDateTime = LocalDateTime.now() | |
val futureDateTime : LocalDateTime = currentDateTime.plus(Duration.ofDays(days.toLong())) |
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
package com.velogica.passwords | |
import org.apache.http.client.fluent.Request | |
import java.util.* | |
/** | |
* Take a list of words, extract three at random, do some switcheraoos to the last word | |
*/ | |
class PasswordGenerator { |
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
def list = ["server1", "server2", "server3"] | |
println list.contains("server1") | |
println list.contains("server4") |