Skip to content

Instantly share code, notes, and snippets.

View philosoralphter's full-sized avatar

Ralph Samuel philosoralphter

View GitHub Profile

AngularJS Style Guide

Opinionated AngularJS style guide for teams by @john_papa

If you are looking for an opinionated style guide for syntax, conventions, and structuring AngularJS applications, then step right in. These styles are based on my development experience with AngularJS, presentations, Pluralsight training courses and working in teams.

If you like this guide, check out my AngularJS Patterns: Clean Code course at Pluralsight.

The purpose of this style guide is to provide guidance on building AngularJS applications by showing the conventions I use and, more importantly, why I choose them.

### USAGE
###
### ./ElasticSearch.sh 1.5.0 will install Elasticsearch 1.5.0
### ./ElasticSearch.sh 1.4.4 will install Elasticsearch 1.4.4
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
### ElasticSearch version
// when the update button for a recipe is clicked
function handleRecipeEditClick(e) {
e.preventDefault();
var $recipeRow = $(this).closest('.recipe');
var recipeId = $recipeRow.data('recipe-id');
console.log('edit recipes', recipeId);
$recipeRow.find('.save-recipe').toggleClass('hidden');
$recipeRow.find('.edit-recipe').toggleClass('hidden');
{"continent":"NA","date":"2017-03-15","country":"US","city":"San Francisco","timezone":"America/Los_Angeles","screen":"","description":"","language":"English","pid":"123abcrft","type":"visit","resolution":"","second":35,"duration":0,"number":0,"post":"94110","browser":"Chrome","id":"DnkLiWme9fjY","lat":37.7484,"hour_of_day":12,"os":"Mac","lng":-122.4156,"offset":"-08:00","method":"","org":"","ip":"98.210.193.12","h":"123abcrft","minute":25,"ct":"cable_dsl","referrer":{"query":"","type":"direct","url":""},"time":1489605935241,"region":"California","visitor":{"first_visit_time":"1489605935241","first_referrer_type":"direct"},"device":"desktop","actions":[{"duration":1,"date":"12:25:35 PM","exit":true,"system":true,"domain":"ralphsamuel.io","name":"label join","id":"QhMMNHymMw","time":1489605935241,"https":false,"passive":false,"properties":{"name":"Optimizely Test","id":"GAT3vFrqd0"}},{"duration":0,"date":"12:25:35 PM","system":false,"landing":true,"domain":"ralphsamuel.io","name":"test1","id":"DnkLiWme9fjY","t
@philosoralphter
philosoralphter / raw_input.md
Last active February 5, 2018 20:31
Data sent to Woopra for import function

Endpoint used: 'PUT https://www.woopra.com/rest/3.0/logs/import?website=canucks.com'

Data sent:

{"visitor": {"tm_city": "Vancouver", "tm_phone_day": "(604) 970-3433", "tm_phone_cell": "", "tm_first_name": "Peter", "tm_country": "Canada", "tm_acct_rep_full_name": "Vanessa Vanderzalm", "tm_email": "petermaclean@shaw.ca","email": "petermaclean@shaw.ca", "tm_street_addr_1": "5866 Olympic Street", "tm_last_name": "MacLean", "tm_street_addr_2": "", "tm_acct_id": "131075", "tm_zip": "V6N 1Z6", "tm_phone_eve": "", "tm_state": "BC"}, "actions": [{"properties": {"event_datetime": "2017-09-17 14:00:00.000", "seat_num": 102, "row_name": "9", "event_name": "CAN0917", "section_name": "308", "team": "VEGAS"}, "name": "tm_attend", "time": 1505682422055}, {"properties": {"event_datetime": "2017-09-28 19:00:00.000", "seat_num": 101, "row_name": "9", "event_name": "CAN0928", "section_name": "308", "team": "CALGARY"}, "name": "tm_attend", "time": 1506651661733}, {"properties": {"event_datetime": "2017-09-28 19:00:00.000
#Stub for memcached client wrapper
require 'dalli'
MEMCACHED_URL = 'localhost:11211'
LOCK_TIMEOUT_SECONDS = 5
MAX_SLEEP_MILLIS = LOCK_TIMEOUT_SECONDS * 1000
RETRY_TIMEOUT_MS = LOCK_TIMEOUT_SECONDS * 2 * 1000
class InstaCache < Dalli
def initialize (options)
@philosoralphter
philosoralphter / PULL_REQUEST_TEMPLATE.md
Last active July 15, 2021 01:10
PR Template proposal

Links

Summary

Discussion/Screenshots

Testing and Deploy notes

I promise:

  • I tested/wrote tests
  • I thought about deploy risks