This file contains hidden or 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 | |
echo "Installing package dependencies" | |
sudo yum update | |
sudo yum install -y apr-devel apr-util-devel autoconf automake curl-devel \ | |
g++ gcc gcc-c++ git glibc-headers httpd-devel libxml2 \ | |
libxml2-devl libxslt libxslt-devel libyaml-devel make \ | |
openssl-devel patch readline \ | |
readline-devel zlib zlib-devel |
This file contains hidden or 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
# Host => Guest (VM) | |
FORWARD_PORTS = { | |
3030 => 3030, # webrick | |
15_432 => 5432 # PostgreSQL | |
} | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. |
This file contains hidden or 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
default: &default | |
adapter: postgresql | |
encoding: utf8 | |
min_messages: warning | |
port: 15432 | |
pool: 5 | |
username: blog_user | |
password: blog_user91x91x | |
host: 127.0.0.1 |
This file contains hidden or 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
package main | |
import "strings" | |
import "fmt" | |
func Collect(list []string, f func(string) string) []string { | |
result := make([]string, len(list)) | |
for i, item := range list { | |
result[i] = f(item) | |
} |
This file contains hidden or 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
package main | |
import "fmt" | |
type car struct { | |
make string | |
model string | |
year int | |
} |
This file contains hidden or 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
package main | |
import "fmt" | |
type car struct { | |
make string | |
model string | |
year int | |
} |
This file contains hidden or 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
# use dot_clean to get rid of things | |
dot_clean /Volumes/MUSIC16/ | |
# Remove .DS_Store files | |
find /Volumes/MUSIC16 -name .DS_Store -delete |
This file contains hidden or 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
# Get 3rd word: | |
bundle exec rails routes | grep pages | awk '{print $3}' | |
# Get 3rd word without (format) | |
bundle exec rails routes | grep pages | awk '{ gsub("\\\(.:format\\\)","",$3); print $3}' | |
# Run eslint, substitute out full path/ directory for project 'home-page' | |
yarn run eslint app/javascript | grep javascript | sed -e 's/Users\/v-kevin.english\/Projects\/home-page\///' |
This file contains hidden or 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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": [ | |
"apigateway:DELETE", | |
"apigateway:GET", | |
"apigateway:GetResources", | |
"apigateway:POST", |
This file contains hidden or 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
# get any route path (third item) with 'user' in it. | |
bundle exec rails routes | grep user | awk '{print $3}' | |
# get any route path (third item) with 'user' in it. | |
# NOTE: this removes the trailing (.:format) | |
bundle exec rails routes | grep user | awk '{ gsub("\\\(.:format\\\)","",$3); print $3}' | |
# generate a Spec file name from react compoment | |
find app/javascript/ReactApps/components | sed -e 's/app/spec/' | sed -e 's/\.js/Spec.js/' |