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
const handler = ({ env }) => { console.log(env.MY_ENV_VAR); }; |
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
const handler = ({ event, context }) => {}; |
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
const { handler } = require("./lambda"); | |
let twitterService; | |
beforeEach(() => { | |
// Creates a mocked twitterService | |
twitterService = { | |
getLatestTweets: jest.fn().mockReturnValue(Promise.resolve()) | |
}; | |
}); |
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
const laconia = require("@laconia/core"); | |
// Creates the dependencies | |
const instances = async () => { | |
const password = await getPassword(); | |
return { twitterService: new TwitterService(password) }; | |
}; | |
// Declare the dependency you need by destructuring | |
const handler = ({ twitterService }) => { |
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 com.cloudbees.hudson.plugins.folder.Folder | |
import hudson.FilePath | |
import jenkins.model.Jenkins | |
def boolean isFolder(String name) { | |
def item = Jenkins.instance.getItemByFullName(name) | |
return item instanceof Folder | |
} | |
def deleteUnusedWorkspace(FilePath root, String path) { |
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 script is adapted from http://stackoverflow.com/a/10286163/2464295 but without the | |
multi threading factor of it. | |
Usage: `externals.py https://svn-server/repository` | |
Do note that the script is excluding src and hidden directories that starts with dot. Just modify the file | |
as it's not parameterized. | |
If you want this script to run faster, SSH to the SVN server and use file protocol. | |
Usage: `externals.py file:///svn/repository` |
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
description = """A simple script to provide multiple profiles for your maven settings at {user.home}/.m2/settings.xml. | |
With the folder structure like below, profile [home] and [work] will be available be used. | |
{user.home}/.m2/profile | |
|-home | |
| |-settings.xml | |
|-work | |
| |-settings.xml | |
""" | |
import argparse, os, shutil |
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
"""ssh-copy-id for Windows. | |
Example usage: python ssh-copy-id.py ceilfors@my-remote-machine | |
This script is dependent on msysgit by default as it requires scp and ssh. | |
For convenience you can also try that comes http://bliker.github.io/cmder/. | |
""" | |
import argparse, os | |
from subprocess import call |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>playground</groupId> | |
<artifactId>testant</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>bundle</packaging> | |
<build> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<parent> | |
<artifactId>playground</artifactId> | |
<groupId>playground</groupId> | |
<version>1.0-SNAPSHOT</version> | |
</parent> | |
<modelVersion>4.0.0</modelVersion> |
NewerOlder