Skip to content

Instantly share code, notes, and snippets.

View amejiarosario's full-sized avatar
🎯
Think big, start small, learn fast!

Adrian Mejia amejiarosario

🎯
Think big, start small, learn fast!
View GitHub Profile
@amejiarosario
amejiarosario / document-object-model.md
Last active May 27, 2016 15:52
80/20 Dev Cheatsheets

Document Object Model (DOM)

Window

Document

Only the most used. Full list

document.body

return content.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.box1 { background: #1abc9c; }
.box2 { background: #3498db; }
.box3 { background: #9b59b6; }
@amejiarosario
amejiarosario / atom_shortcuts.md
Last active February 23, 2016 20:11
atom shortcuts
  • alt-cmd-shift-{ to fold code on page
  • alt-cmd-shift-} to unfold everything use
@amejiarosario
amejiarosario / benchmark_meanshop_digital_ocean.txt
Created October 14, 2015 20:40
Benchmark of meanshop app deployed at Digital Ocean
$ ab -c 100 -n 10000 http://PUBLIC-IP-ADDRESS/api/products
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking PUBLIC-IP-ADDRESS (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
@amejiarosario
amejiarosario / benchmark_meanshop_heroku.txt
Last active August 9, 2017 19:48
Benchmark of meanshop app deployed at Heroku
$ ab -c 100 -n 10000 https://meanshop-8.herokuapp.com/
This is ApacheBench, Version 2.3 <$Revision: 1604373 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking meanshop-8.herokuapp.com (be patient)
Completed 1000 requests
Completed 2000 requests
Completed 3000 requests
// Count number of stylesheets files and selectors (per file and total)
(function countCSSRules() {
var results = '',
log = '',
total = 0;
if (!document.styleSheets) {
console.log('No stylesheets found!');
return;
} else {
@amejiarosario
amejiarosario / ngTodo.html
Created October 3, 2014 01:53
AngularJS Todo App
<html ng-app="app">
<head>
<title>ngTodo</title>
</head>
<body>
<ng-view></ng-view>
<!-- Libraries -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"></script>
@amejiarosario
amejiarosario / ngTodos.html
Last active March 1, 2018 08:28
angularJS routes todo app
<html ng-app="app">
<head>
<title>Hello Controllers in AngularJS</title>
</head>
<body>
<ng-view></ng-view>
<!-- Libraries -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"></script>
@amejiarosario
amejiarosario / LjiBo.markdown
Created September 30, 2014 22:56
A Pen by Adrian Mejia.
@amejiarosario
amejiarosario / deploy.rake
Last active May 10, 2016 15:01 — forked from njvitto/deploy.rake
Rakefile to deploy and rollback to Heroku in two different environments (staging and production) for the same app, tail logs, ps, and more!
# rake deploy # Push app to heroku:production, migrate, restarts and tail logs
# rake deploy:production # Push app to production, migrate, restarts, tag and tail logs
# rake deploy:production:config # production config
# rake deploy:production:console # production console
# rake deploy:production:logs # production logs
# rake deploy:production:ps # production ps
# rake deploy:production:releases # production releases
# rake deploy:staging # Push app to staging, migrate, restarts, tag and tail logs
# rake deploy:staging:config # staging config
# rake deploy:staging:console # staging console