Skip to content

Instantly share code, notes, and snippets.

Eric Miller SimplGy

Block or report user

Report or block SimplGy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@SimplGy
SimplGy / Change-MAC-Address.md
Created Mar 14, 2015
Change a MAC address in OSX and disconnect correctly from the current WIFI network.
View Change-MAC-Address.md

Quick Start

Figure out which en interface to use

ifconfig 

See the mac address

ifconfig en0 | grep ether
@SimplGy
SimplGy / osxWifiTerminal.md
Last active Aug 29, 2015
OSX wifi-related terminal commans
View osxWifiTerminal.md

Turn off wifi on your macbook from the Mac OSX terminal command line:

networksetup -setairportpower en0 off

Turn on wifi on your macbook from the Mac OSX terminal command line:

networksetup -setairportpower en0 on

List available wifi networks from the Mac OSX terminal command line:

@SimplGy
SimplGy / countWirelessNetworks.sh
Created Mar 27, 2015
Count the number of wireless networks your mac has ever connected to
View countWirelessNetworks.sh
networksetup -listpreferredwirelessnetworks en0 | wc -l
@SimplGy
SimplGy / infiniteBacon-start.html
Last active Aug 29, 2015
FRP Infinite Scroll with Bacon.js -- Starting File
View infiniteBacon-start.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FRP Infinite Scroll using Bacon.js</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/bacon.js/0.7.53/Bacon.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/3.7.0/lodash.min.js"></script>
<style type="text/css">
body {
@SimplGy
SimplGy / infiniteBacon-finished.html
Last active Oct 8, 2015
An infinite scroller built with Bacon using FRP techniques
View infiniteBacon-finished.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>FRP Infinite Scroll using Bacon.js</title>
<script src="//cdnjs.cloudflare.com/ajax/libs/bacon.js/0.7.53/Bacon.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/3.7.0/lodash.min.js"></script>
<style type="text/css">
body {
@SimplGy
SimplGy / backUpDropbox.sh
Created May 8, 2015
Backs up your dropbox folder recursively and incrementally to a file named by the month and year. Meant to run as a cron job.
View backUpDropbox.sh
#!/bin/bash
echo "Starting Dropbox Backup"
echo "-----------------------"
echo `date`
cd ~
mkdir -p "Dropbox Backups"
echo "Archiving './Dropbox' to 'DropBox Backups/Dropbox_YEAR-MM).zip'.."
@SimplGy
SimplGy / anchorize-jekyll-headings.js
Last active Jun 8, 2018
For every heading in your page, this adds a little anchor link `#` that you can click to get a permalink to the heading. No dependency on jQuery or anything else. Requires that your headings already have an `id` attribute set (because that's what jekyll does)To use it, just drop it in the layout you use for your blog pages. You can style `.deepL…
View anchorize-jekyll-headings.js
(function(){
'use strict';
/*
Create intra-page links
Requires that your headings already have an `id` attribute set (because that's what jekyll does)
For every heading in your page, this adds a little anchor link `#` that you can click to get a permalink to the heading.
Ignores `h1`, because you should only have one per page.
The text content of the tag is used to generate the link, so it will fail "gracefully-ish" if you have duplicate heading text.
*/
@SimplGy
SimplGy / facebookMessengerSpam.js
Created May 20, 2015
Let's say a friend sends you 184 icons to spam you. Here's a script to send them back. Just pop open the avatar selection window in facebook and drop in the id of the one you want to spam them with.
View facebookMessengerSpam.js
var id = 1530358597204949; // the id of the dom node that has the icon you want
var makeItStopDannySelvag = setInterval(function(){
var node = document.querySelectorAll('[data-id="'+ id +'"]')[0];
$n = $(node);
$n.click();
}, 500);
@SimplGy
SimplGy / createColoredIconImage.swift
Created Aug 19, 2015
Create a colored version of an existing UIImage in swift. Great for coloring icons.
View createColoredIconImage.swift
class Icon {
// Create a colored version of an existing image. Great for coloring icons.
// @param name of the image in your bundle
// @param color of the image to return
static func createColoredVersionOfImageNamed(name: String, color: CGColor) -> UIImage {
let img = UIImage(named: name)!
let rect = CGRect(origin: CGPointZero, size: img.size)
UIGraphicsBeginImageContextWithOptions(rect.size, false, img.scale)
let context = UIGraphicsGetCurrentContext()
View John Papa Style Guide Review.md
  • Single Responsibility -- one thing per file
  • IIFE -- free from coffeescript
  • Modules -- declare once, nest namespaces
  • Controllers -- name your fns, use controllerAs, vm = this, public methods at top of file
  • Services -- delegate all possible behavior to here for easier testing
  • Factories -- api up top, use promises for data calls
  • Data Services
  • Directives
  • Resolving Promises for a Controller
  • Manual Annotating for Dependency Injection
You can’t perform that action at this time.