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 | |
directory=${1:-""} | |
percentage=${2:-"25"} | |
watermark_image=${3:-"watermark.png"} | |
location="southwest" | |
if [ -z "$directory" ]; then | |
echo "Error: directory argument is required" | |
exit 1 |
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 itertools | |
import sys | |
from filch import boards | |
from filch import configuration | |
from filch import constants | |
from filch import data | |
from filch import exceptions as peeves | |
BOARD_NAME = "Workflows-DFG-Rocky" |
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
class ExternalEffortReport(reports.FileReport): | |
template_name = "/home/rbrady/ee_rpt.txt", | |
output_name = "/home/rbrady/external_efforts.txt" | |
def get_context_data(self, **kwargs): | |
# Call the base implementation first to get a context | |
context = super(ExternalEffortReport, self).get_context_data(**kwargs) | |
# get a reference to the desired cards | |
config = configuration.get_config() | |
manager = boards.BoardManager(config['trello'], BOARD_NAME) |
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.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.Scanner; | |
public class Unit3 { | |
private static final String FILENAME = "energyProduced.txt"; | |
private static final double ELECTRICITY_COST = 0.85; |
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 | |
# change dir to the first arg to the script | |
cd $1 | |
if [[ "$2" != "" ]]; then | |
FONT_TYPE="$2" | |
else | |
FONT_TYPE="Helvetica" | |
fi |
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
my-trello-board | |
-------------------- | |
- Backlog | |
- Write code for feature C | |
- Write code for feature D | |
- In Progress |
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
{{ board.name }} | |
-------------------- | |
{% for list_item in board.open_lists() %} | |
- {{ list_item.name }} | |
{% for card in list_item.list_cards() %} | |
- {{ card.name }} | |
{% endfor %} | |
{% endfor %} |
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
# check for board existence | |
board = [b for b in trello_api.list_boards() if b.name == board_name][0] | |
# if no board, print error and exit | |
if not board: | |
click.echo("Trello board not found!") | |
sys.exit(1) | |
# create board context | |
context = {'board': board} |
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 base | |
class MyCustomAction(base.Action): | |
def run(self): | |
return "I ran" | |
class MyAsyncAction(base.AsyncMixin, base.Action): |
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 abc | |
class Action(object): | |
@abc.abstractmethod | |
def run(self): | |
pass | |
NewerOlder