Skip to content

Instantly share code, notes, and snippets.

View apex-omontgomery's full-sized avatar

Olivia Montgomery apex-omontgomery

  • ApexFintechSolutions
  • Denver
  • 23:24 (UTC -06:00)
View GitHub Profile
PS C:\Users\wimo7\Desktop\team_back> docker-compose run web rake seed_team_members:reseed_all --trace
S done
tarting operationcodebackend_redis_1 ... done
Starting operationcodebackend_bundle_1 ... done
** Invoke seed_team_members:reseed_all (first_time)
** Invoke environment (first_time)
** Execute environment
W, [2018-04-11T04:08:06.817543 #1] WARN -- : [SKYLIGHT] [1.5.0] Running Skylight in development mode. No data will be reported until you deploy your app.
(To disable this message for all local apps, run `skylight disable_dev_warning`.)
I, [2018-04-11T04:08:07.141417 #1] INFO -- : Raven 2.5.3 configured not to capture errors: DSN not set
PS C:\Users\wimo7\Desktop\hampton> yarn
yarn install v1.3.2
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.74s.
PS C:\Users\wimo7\Desktop\hampton> yarn run build
yarn run v1.3.2
$ node scripts/build.js
Creating an optimized production build...
(node:10636) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
@apex-omontgomery
apex-omontgomery / make db_migrate
Created April 22, 2018 03:29
slack user migration
PS C:\Users\wimo7\Desktop\back> make db_migrate
docker-compose run web rake db:migrate
Starting operationcodebackend_operationcode-psql_1 ... done
Starting operationcodebackend_bundle_1 ... done
Starting operationcodebackend_redis_1 ... done
W, [2018-04-22T03:19:15.749687 #1] WARN -- : [SKYLIGHT] [1.5.0] Running Skylight in development mode. No data will be reported until you deploy your app.
(To disable this message for all local apps, run `skylight disable_dev_warning`.)
I, [2018-04-22T03:19:16.070514 #1] INFO -- : Raven 2.5.3 configured not to capture errors: DSN not set
W, [2018-04-22T03:19:16.594481 #1] WARN -- : Creating scope :open. Overwriting existing method GitHubStatistic.open.
D, [2018-04-22T03:19:17.058166 #1] DEBUG -- : (0.2ms) SELECT pg_try_advisory_lock(3885840460873229985);
"""
some_config.txt is the file
inside you have a value like
LASTSPECIFICVAL="222"
"""
@apex-omontgomery
apex-omontgomery / splitklv.awk
Created May 18, 2018 00:49
split klv of length k
#!/bin/awk -f
# prints each klv based on beginning length on a new line
# 012TESTYYYNN014NEWSYYYNNYY
# 012TESTYYYNN
# 014NEWSYYYNNYY
{
for(columIndex=0; columIndex <=length($0); columIndex++)
{
currLen = int(substr($1, columIndex, 3) )
print substr($1,columIndex,currLen)
import requests
from creds import LEGACY_TOKEN
from datetime import datetime
from exceptions import (InvalidAuthToken,
APIRequestError)
channel_history_url = "https://slack.com/api/channels.history"
channel_list_url = 'https://slack.com/api/channels.list'
channel_archive_url = 'https://slack.com/api/channels.archive'
post_message_url = 'https://slack.com/api/chat.postMessage'

base/init.sls

$ cat /srv/salt/roles/base/init.sls
include:
  - salt-minion
  

Root file

salt-repo:
pkgrepo.managed:
- humanname: SaltStack Repo
- name: deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.3 {{ grains['lsb_distrib_codename'] }} main
- dist: {{ grains['lsb_distrib_codename'] }}
- key_url: https://repo.saltstack.com/py3/ubuntu/16.04/amd64/latest/SALTSTACK-GPG-KEY.pub
salt-minion:
pkg.latest:
- name: salt-minion
@apex-omontgomery
apex-omontgomery / pillar-org.md
Last active November 12, 2019 15:31
Organizing pillar data to apply roles with merging of pillar

Pillar match top by minion id

# /srv/pillar/top.sls

base:
  '*':
    - roles.saltstack.minion
    
  '*saltmaster*':
location /api_thing/api {
if (-f /etc/nginx/maint_mode/api_thing) {
return 503;
}
- limit_req zone=api_thing_servers burst=2000 nodelay;
+ limit_req zone=api_thing_servers0 burst=2000 nodelay;
+ limit_req zone=api_thing_servers1 burst=4000 nodelay;
+ limit_req zone=api_thing_servers2 burst=1000 nodelay;
client_max_body_size 1m;
}