Skip to content

Instantly share code, notes, and snippets.

View alexpaluzzi's full-sized avatar

Alex Paluzzi alexpaluzzi

View GitHub Profile
@alexpaluzzi
alexpaluzzi / gist:5595e579ed97c6a1a5ef
Last active August 29, 2015 14:01
Constructor functions the "Angular way" (slightly opinionated)
// Factory is a great place to keep the constructor and instance methods
app.factory('User', function() {
function User(username, email) {
this.username = username;
this.email = email;
}
User.prototype = {
printUser: function() {
console.log(this.username);
},
@addyosmani
addyosmani / README.md
Last active July 24, 2024 10:54 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@alexpaluzzi
alexpaluzzi / gist:b90881882ee7e6ce44590145447e86fd
Created January 23, 2017 20:07
Archive everything in Google Voice (Classic) - Web
(()=>{
function select() {
document.getElementsByClassName('jfk-checkbox-checkmark')[0].click()
};
function archive() {
function triggerMouseEvent(node, eventType) {
let clickEvent = document.createEvent('MouseEvents');
clickEvent.initEvent(eventType, true, true);
node.dispatchEvent(clickEvent);