Skip to content

Instantly share code, notes, and snippets.

@chytreg
chytreg / circle.yml
Created January 12, 2017 09:35
docker
machine:
pre:
# install docker 1.10.0
- curl -sSL https://git.io/vrcFi | bash -e
# install yarn
- curl -sSL https://git.io/v1XIm | bash -e
services:
- docker
dependencies:
override:
#!/bin/bash -xe
YARN_VERSION=${YARN_VERSION:-0.17.10}
if [[ ! -e ~/.yarn/bin/yarn || $(yarn --version) != "${YARN_VERSION}" ]]; then
echo "Download and install Yarn."
curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version $YARN_VERSION
else
echo "The correct version of Yarn is already installed."
fi
@chytreg
chytreg / fix-hipchat.sh
Last active August 29, 2015 14:08
Get random HipChat IP and modify /etc/hosts
#!/usr/bin/env bash
set -e
rand() {
printf $(( $1 * RANDOM / 32767 ))
}
rand_element () {
local -a th=("$@")
unset th[0]
diff --git a/README.md b/README.md
index e4e7348..3aa3845 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,10 @@ Okta trial information you can find [here](https://monterail.hackpad.com/Cooleaf
If there are two ENV variables set: `BASIC_USERNAME` and `BASIC_PASSWORD`
whole application will be guarded by basic auth.
+### Tags Cache
+Tags cache attribute for Role and Persona is updated by database stored procedure on taggings table.
console.log 'for in', "all: #{$scope.all}"
for user in $scope.participants
console.log user
user.checked_out_events[$scope.id].selected = $scope.all
console.log 'forEach', "all: #{$scope.all}"
_.forEach $scope.participants, (user) ->
console.log user
user.checked_out_events[$scope.id].selected = $scope.all
@chytreg
chytreg / sublime-settings.json
Created April 2, 2014 08:37
Sublime-Settings.json
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"dictionary": "Packages/Language - English/en_US.dic",
"ensure_newline_at_eof_on_save": true,
"font_face": "Monaco",
"font_size": 12.0,
"hot_exit": false,
"ignored_packages":
[
"Vintage"
@chytreg
chytreg / boxen-setup.sh
Created October 4, 2013 08:04
Bexen Setup script
sudo mkdir -p /opt/boxen
sudo chown ${USER}:staff /opt/boxen
git clone https://github.com/chytreg/our-boxen.git /opt/boxen/repo
cd /opt/boxen/repo
script/boxen --debug
@chytreg
chytreg / sublime.json
Last active December 23, 2015 04:09
Sublime Text 2 settings
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"dictionary": "Packages/Language - English/en_US.dic",
"font_face": "Monaco",
"font_size": 12.0,
"ignored_packages":
[
"Vintage"
],
"theme": "Nexus.sublime-theme",
class ApplicationController < ActionController::Base
# Turn on request forgery protection
protect_from_forgery
after_filter :set_csrf_cookie_for_ng
def set_csrf_cookie_for_ng
cookies['XSRF-TOKEN'] = form_authenticity_token if protect_against_forgery?
end
protected
ssh mm4user@demo03.marketmaker4.com -vvv -i ~/.ssh/id_rsa_monterail [ 2.0.0-p0 ]
OpenSSH_5.6p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /etc/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to demo03.marketmaker4.com [50.57.55.50] port 22.
debug1: Connection established.
debug3: Not a RSA1 key file /Users/chytreg/.ssh/id_rsa_monterail.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype