Skip to content

Instantly share code, notes, and snippets.

View Mattsface's full-sized avatar

Matthew Spah Mattsface

View GitHub Profile
@Mattsface
Mattsface / test
Last active August 29, 2015 14:04
set :environment, "development"
set :output, {:error => 'log/cron_error_log.log', :standard => 'log/cron_log.log'}
every 1.minutes do
command "echo 'test'"
end
crontab -l
# Begin Whenever generated tasks for: /Users/mspah/Documents/Ruby/RubySummer2014/Library-Application/config/schedule.rb
* * * * * /bin/bash -l -c 'echo '\''test'\'' >> log/cron_log.log 2>> log/cron_error_log.log'
class EmailPrefs < ActiveRecord::Base
belongs_to :user
end
@Mattsface
Mattsface / index()
Created April 8, 2015 01:19
Index()
class MyModel(Base):
__tablename__ = 'models'
id = Column(Integer, primary_key=True)
name = Column(Text)
value = Column(Integer)
Index('my_index', MyModel.name, unique=True, mysql_length=255)
package main
import (
//"fmt"
"github.com/scottdware/go-bigip"
//"io"
//"io/ioutil"
"os/user"
"net/http"
bucket = aws.s3.Bucket("backup-bucket")
role_policy = aws.iam.RolePolicy(
"gitlab_policy",
role=role.id,
policy=json.dumps(
{
"Version": "2012-10-17",
"Statement": [
{
class MyMocks(pulumi.runtime.Mocks):
"""Mock the expected result of resource calls made via the Pulumi API."""
def new_resource(self, args: pulumi.runtime.MockResourceArgs) -> Any:
"""SBC."""
outputs = args.inputs
print(args.typ)
# print(outputs)
if args.typ == "aws:ec2/instance:Instance":
outputs = {