Skip to content

Instantly share code, notes, and snippets.

joemaller / re-thinking-angularjs.markdown
Last active August 29, 2015 13:57
Thoughts on the future of AngularJS
View re-thinking-angularjs.markdown

Re-thinking AngularJS

The [Angular 2.0 preview roadmap][ng-2] was recently posted to [HN][ng-hn] and after reading it, I'm starting to think adopting Angular might have been a mistake.

Having built a few small projects with [AngularJS][ng], I've found the framework a pleasure to work with. Once past the initial learning curve, features started flying together. Most of my trouble-shooting time was spent getting backend data delivered correctly, Angular just worked. Based on this positive experience, I've been moving towards adopting Angular as the standard frontend of my web toolkit.

Choosing Angular wasn't without doubts. Introducing this many new conventions, syntaxes and practices doesn't come without a cost. The problem with re-invention is longevity: Either these new ideas succeed and become the norm, or they're left for dead on the side of the road as technology marches on.

Parts of the 2.0 roadmap sound great. But it also sounds as if this future Angular will be very different from the Angular w

View gulp-ify.js
gulp.task('gulpify', function() {
//using vinyl-transform lets us use any transforms available to browserify
.on('error', $.util.log)
// converting .jsx/coffee/etc. into a temp folder prior to 'bundling' reduces additional boilerplate later-on
joemaller / one-line-sourcemap.css
Created July 12, 2014 02:33
This is the CSS file that's failing to be picked up by convert-source-map. Mentioned here:
View one-line-sourcemap.css
body p{color:red;}body h1{color:orange;}body h1 p{color:green;}/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJhcHAvc2Nzcy90ZXN0LnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsS0FBSyxFQUVHLE1BQU8sS0FDZixLQUFLLEdBRUcsTUFBTyxRQUFmLEtBQUssR0FBRyxFQUVJLE1BQU8iLCJzb3VyY2VzQ29udGVudCI6WyJib2R5IHtcbiAgICBwIHtcbiAgICAgICAgY29sb3I6IHJlZDtcbiAgICB9XG4gICAgaDEge1xuICAgICAgICBjb2xvcjogb3JhbmdlO1xuICAgICAgICBwIHtcbiAgICAgICAgICAgIGNvbG9yOiBncmVlbjtcbiAgICAgICAgfVxuICAgIH1cbn0iXX0=*/
joemaller / gist:c05ca826971f9b563ce8
Created January 16, 2015 02:14
View a uniq list of connections from /var/log/vsftpd.log
View gist:c05ca826971f9b563ce8
sudo grep CONNECT /var/log/vsftpd.log | cut -d ']' -f2 | uniq
joemaller /
Last active August 29, 2015 14:14
AutoFill bookmarklet - For quickly populating web forms for testing.

To install, just copy this url into a bookmark:

javascript:(function(){var s=document.createElement('script');s.type='text/javascript';s.async=true;s.src='';document.getElementsByTagName('head')[0].appendChild(s);})()

Lightly tested, seems to work most everywhere.

joemaller /
Last active August 29, 2015 14:15
Kickstart wifi connection on old Mac

My webcam is running on an old MacBook that seems to have a spotty connection to the internet. When this computer drops the wifi connection, it doesn't ever seem to reconnect. The networksetup command can be used to reconnect, so I'm calling this every 5 minutes from cron to force the connection.

The command was also added to /etc/sudoers so we can call the command with sudo without a password.

joemaller / fail2ban unbanip commands
Created March 5, 2015 02:29
Commands for unbanning IP address jailed by fail2ban
View fail2ban unbanip commands
sudo fail2ban-client set ssh unbanip
sudo fail2ban-client set vsftpd unbanip
# sudo fail2ban-client set [jail_name] unbanip [ip_address]
joemaller / gulpfile.js
Last active August 29, 2015 14:18
A proof-of-concept gulpfile that reloads itself onchange. Not especially stable and leaves an orphan gulp process, but useful for quickly iterating a gulpfile.
View gulpfile.js
'use strict';
var gulp = require('gulp');
var spawn = require('child_process').spawn;
* gulpfile-reload auto-reloads this gulpfile, called from 'watch'
* This leaves an orphaned gulp process running after `gulp watch` exits
gulp.task('gulpfile-reload', function() {
joemaller / ca-counties.json
Last active August 29, 2015 14:25
TopoJSON files listing county name and population for a few US States. For a D3 experiment on CodePen.
View ca-counties.json
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
joemaller / Script.txt
Last active August 29, 2015 14:25
audio test
View Script.txt
Please Read the following out loud, pausing between words.