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 datetime | |
from sqlalchemy import Column, Integer, String, DateTime | |
from sqlalchemy import not_, exists, alias, select | |
from sqlalchemy.ext.hybrid import hybrid_property | |
import models | |
class Task(models.BaseModel): | |
id = Column(Integer, primary_key=True) | |
# Domain name of the website |
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
# Full instructions: http://manpages.ubuntu.com/manpages/bionic/en/man8/mmcli.8.html | |
# Examples: http://manpages.ubuntu.com/manpages/bionic/en/man8/mmcli.8.html#examples | |
# Supported modems: https://www.freedesktop.org/wiki/Software/ModemManager/SupportedDevices/ | |
# Get list of connected modems. | |
mmcli --list-modems | |
# Output: | |
# Found 1 modems: | |
# /org/freedesktop/ModemManager1/Modem/1 [huawei] E3531 | |
# The number at the end of the path is the modem index. |
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
[Unit] | |
Description=Puma Rails Server | |
After=network.target | |
[Service] | |
Type=simple | |
User=deploy | |
WorkingDirectory=/var/apps/upshift/current | |
ExecStart=/usr/local/rvm/bin/rbenv default do bundle exec pumactl -S /var/apps/upshift/shared/tmp/pids/puma.state -F /var/apps/upshift/shared/puma.rb start | |
ExecStop=/usr/local/rvm/bin/rbenv default do bundle exec pumactl -S /var/apps/upshift/shared/tmp/pids/puma.state -F /var/apps/upshift/shared/puma.rb stop |
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
#!/usr/bin/env ruby | |
# | |
# USAGE: | |
# $ ./repeated_feature_test.rb n test | |
# n: number of times to run the test | |
# test: the test you would like to run, such as "cucumber" or | |
# "cucumber features/posts.feature --format progress" | |
# | |
# Due to the nature of executing commands, you will not see output until the end | |
# of each test round. For example, if you set "cucumber" as the task, you will |
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
<?php | |
// functions.php | |
// ... | |
// add new buttons | |
add_filter( 'mce_buttons', 'myplugin_register_buttons' ); | |
function myplugin_register_buttons( $buttons ) { | |
array_push( $buttons, '|', 'custom_class'); |