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 | |
git clone https://github.com/withbelay/alpaca-proxy | |
cd alpaca-proxy | |
docker build -t alpaca-proxy . | |
docker run -e ALPACA_BASE_URL=https://broker-api.sandbox.alpaca.markets \ | |
-e ALPACA_KEY=YOUR_ALPACA_KEY \ | |
-e ALPACA_SECRET=YOUR_ALPACA_SECRET \ | |
-e BELAY_SECRET=secret \ | |
-e SECRET_KEY_BASE=any_random_string \ |
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 belay.client import PolicyClient | |
from belay.requests import PolicyPurchaseRequest | |
from belay.enums import Durations | |
policy_client = PolicyClient('client_id', 'client_secret', sandbox=True) | |
policy_client.purchase( | |
PolicyPurchaseRequest( | |
sym="AAPL", | |
qty=5, |
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
async createPayment({ | |
neatAccountId, | |
paymentToken, | |
amount, | |
paymentId, | |
rbit, | |
cardHolder, | |
providerSettings, | |
}: CreditCardPaymentRequest): Promise<WePayPayment> { | |
this.validateRbit(rbit) |
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
### Keybase proof | |
I hereby claim: | |
* I am jeffdeville on github. | |
* I am jeffdeville (https://keybase.io/jeffdeville) on keybase. | |
* I have a public key ASDWgkKEASzvtUQnTN8oBZBhCEoe87V8lU9vsKY87mUE3wo | |
To claim this, I am signing this object: |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 2.
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
post_latitude,post_longitude,MatchType,NumMatch,MatchScore,post_category,post_type,post_status,post_title,post_content,post_tags,post_address,post_city,post_region,post_country,post_zip,IMAGE | |
42.2271049,-71.1782327,ExactMatch,Rooftop,100,Naturopaths,gd_place,published,Read Weaver Schusky,"I'm particularly good at educating my patients, about their current health conditions, and about treatment and prevention. I came into medicine strongly influenced by the women's self-care movement of the '70; I believe health care can be about giving people control over their bodies and their lives. While homeopathy is only one of the modalities I use, the skills needed to be a good homeopath, deeply understanding a patient, serve me (and my patients) well in whatever form of treatment we choose. One of the things I like best about being a naturopathic doctor is the wide range of options I have in treating my patients. Being able to choose among nutrition, herbal medicine, homeopathy, physical medicine, and counseling, as w |
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
--- | |
restart_sidekiq: &RESTART_SIDEKIQ | |
mode: "000755" | |
content: | | |
#!/bin/bash | |
initctl restart sidekiq || initctl start sidekiq | |
ln -sf /var/app/current/log/sidekiq.log /var/app/containerfiles/logs/sidekiq.log | |
mute_sidekiq: &MUTE_SIDEKIQ | |
mode: "000755" | |
content: | |
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
GIT | |
remote: git://github.com/activeadmin/activeadmin.git | |
revision: d84f8190edac8c28f942cd4b6c3e16086da9d7a2 | |
specs: | |
activeadmin (1.0.0.pre2) | |
arbre (~> 1.0, >= 1.0.2) | |
bourbon | |
coffee-rails | |
formtastic (~> 3.1) | |
formtastic_i18n |
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
require 'angelo' | |
require 'bunny' | |
Celluloid.logger = ::Logger.new(STDOUT) | |
module Receiver | |
class Server < Angelo::Base | |
get '/status' do | |
# TODO return number of incomplete tasks | |
# Look at self.class.server |
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 log(func): | |
@wraps(func) | |
def log_wrapper(func): | |
log_input(func.__name__, url, **new_kwargs) | |
try: | |
resp = func(url, **new_kwargs) | |
log_output(resp) | |
except Exception, e: | |
log_exception(e, resp) | |
raise e |
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
{ | |
"cloud_admin": "role:domain_admin and domain_id:default", | |
"service_or_admin": "role:admin or role:service_role", | |
"matching_domain_id": "domain_id:%(target.project.domain_id)s or domain_id:%(project.domain_id)s or domain_id:%(target.user.domain_id)s or domain_id:%(user.domain_id)s or domain_id:%(target.group.domain_id)s or domain_id:%(group.domain_id)s or domain_id:%(target.token.user.domain.id)s", | |
"matching_project_id": "project_id:%(scope.project.id)s or project_id:%(project_id)s)" | |
"matching_user_id": "user_id:%(user_id)s or user_id:%(target.token.user_id)s", | |
"owner" : "rule: matching_user_id" | |
"project_admin": "role:admin and rule:matching_project_id", | |
"project_member": "role:member and rule:matching_project_id", |
NewerOlder