Skip to content

Instantly share code, notes, and snippets.

View eddywashere's full-sized avatar
🔥
loading...

Eddy Hernandez eddywashere

🔥
loading...
View GitHub Profile
@eddywashere
eddywashere / README.md
Last active May 19, 2023 02:17
Load third party javascript asynchronously, initialize queue for method calls, replace queue function, profit?

live demo

Files:

  • index.html: example of queue (the part that is always shown)
  • third-party.js: example of third party javascript (the part no one ever talks about)

Inspiration:

  • google analytics
/* Custom styles for Confluence (included for all themes by default) */
/*****************************************************
** PUT SPACE SPECIFIC STYLING HERE (NOT AT BOTTOM)
***************************************************/
#children-section
{
display : none;
@eddywashere
eddywashere / app.jsx
Created February 7, 2016 05:26
higher order layout component example in React
import React from 'react';
import { render } from 'react-dom';
import {PageContent, PageSidebar} from './Content';
import Layout from './Layout';
const Example = Layout({Content: PageContent, Sidebar: PageSidebar});
render(Example, document.getElementById('app'))
@eddywashere
eddywashere / html-css-js-resources.md
Last active August 27, 2020 19:47
HTML/CSS/JS resources

HTML/CSS/JS Resources

###Video

  • 30 Days to Learn HTML & CSS
    • Plenty of short tuts on html/css. (Kind of boring but definitely thorough)
  • Functional HTML5 & CSS3
    • Practical applications of html5 and css3, works its way into a site build with good info along the way
  • CSS Cross-Country
  • Very, very in depth look at css. Definitely the best video css resource I've come across.
@eddywashere
eddywashere / cloudwatchlogs.js
Created May 1, 2017 17:03
get cloudwatch logs
const _ = require('lodash');
const AWS = require('aws-sdk');
const retry = require('bluebird-retry');
function recursiveReq(request, params, key, items = [], count = 0) {
return request(params).then(data => {
const newItems = items.concat(data[key]);
const lastItem = _.last(newItems);
const nextToken = _.get(data, 'nextToken', null);
@eddywashere
eddywashere / App.js
Last active February 20, 2020 10:15 — forked from gaearon/App.js
Reactstrap App.js Example for create-react-app
import React, { Component } from 'react';
import {
Collapse,
Navbar,
NavbarToggler,
NavbarBrand,
Nav,
NavItem,
NavLink,
Container,
@eddywashere
eddywashere / ubuntu-setup.sh
Created August 19, 2012 16:27
Ubuntu Setup (12.04)
#!/bin/sh
## current 1 liner
# wget http://url.com/ubuntu-setup.sh && chmod 700 ubuntu-setup.sh && ./ubuntu-setup.sh
# use raw url from github ;]
echo "Choose setup: user, setup, or mail"
read choice
if [ $choice = user ]
@eddywashere
eddywashere / data-
Created February 3, 2016 18:34
ublock origin's base64 encoded google analytics replacement scripts
Request URL:data:application/javascript;base64,
KGZ1bmN0aW9uKCkgewoJLy8gaHR0cHM6Ly9kZXZlbG9wZXJzLmdvb2dsZS5jb20vYW5hbHl0aWNzL2Rldmd1aWRlcy9jb2xsZWN0aW9uL2FuYWx5dGljc2pzLwoJdmFyIG5vb3BmbiA9IGZ1bmN0aW9uKCkgewoJCTsKCX07Cgl2YXIgbm9vcG51bGxmbiA9IGZ1bmN0aW9uKCkgewoJCXJldHVybiBudWxsOwoJfTsKCS8vCgl2YXIgVHJhY2tlciA9IGZ1bmN0aW9uKCkgewoJCTsKCX07Cgl2YXIgcCA9IFRyYWNrZXIucHJvdG90eXBlOwoJcC5nZXQgPSBub29wZm47CglwLnNldCA9IG5vb3BmbjsKCXAuc2VuZCA9IG5vb3BmbjsKCS8vCgl2YXIgZ2FOYW1lID0gd2luZG93Lkdvb2dsZUFuYWx5dGljc09iamVjdCB8fCAnZ2EnOwoJdmFyIGdhID0gZnVuY3Rpb24oKSB7CgkJdmFyIGxlbiA9IGFyZ3VtZW50cy5sZW5ndGg7CgkJaWYgKCBsZW4gPT09IDAgKSB7CgkJCXJldHVybjsKCQl9CgkJdmFyIGYgPSBhcmd1bWVudHNbbGVuLTFdOwoJCWlmICggdHlwZW9mIGYgIT09ICdvYmplY3QnIHx8IGYgPT09IG51bGwgfHwgdHlwZW9mIGYuaGl0Q2FsbGJhY2sgIT09ICdmdW5jdGlvbicgKSB7CgkJCXJldHVybjsKCQl9CgkJdHJ5IHsKCQkJZi5oaXRDYWxsYmFjaygpOwoJCX0gY2F0Y2ggKGV4KSB7CgkJfQoJfTsKCWdhLmNyZWF0ZSA9IGZ1bmN0aW9uKCkgewoJCXJldHVybiBuZXcgVHJhY2tlcigpOwoJfTsKCWdhLmdldEJ5TmFtZSA9IG5vb3BudWxsZm47CglnYS5nZXRBbGwgPSBmdW5jdGlvbigpIHsK
@eddywashere
eddywashere / example-alarm.json
Created June 18, 2014 05:10
Example webhook data from Rackspace Cloud Monitoring
{
"event_id": "12345678910:1403052700000:OK",
"log_entry_id": "123456789101234567891012345678910",
"details": {
"target": "rackspace.com",
"timestamp": 1403052704485,
"metrics": {
"duration": {
"type": "I",
"data": 240,

by.model

<input type="text" ng-model="yourName">

// by.model('yourName')

by.binding