Skip to content

Instantly share code, notes, and snippets.

@bryanburgers
bryanburgers / gist:4531874
Created January 14, 2013 17:48
npm outdated doesn't tell me I can upgrade a version
/* package.json */
{
"name": "test",
"version": "0.0.1",
"dependencies": {
"semver": "1.1.1"
}
}
/*
@bryanburgers
bryanburgers / gist:6009871
Created July 16, 2013 15:41
Using bash and git to get a list of all of the projects I've touched in the last quarter.
# Adapted from https://coderwall.com/p/tfx67w
function githistory {
since="2013-04-17"
author="Bryan";
directory="/d/projects"
pushd $directory > /dev/null;
find . -maxdepth 3 -name ".git" | sed "s:/\.git$::g" |
while read line;
do
@bryanburgers
bryanburgers / how-i-git.md
Last active December 21, 2015 11:28
How I git. A short description of my workflow. This would be a post on my blog if I had a blog.

How I git

It was late afternoon on Friday and I was more than ready to go home after a long week when I opened an email about a regression on a client website. Which, of course, needed to be fixed before the weekend started. So I brought up the page, determined that yes, there was a problem, and started to look for when and where it was introduced. I'm somewhat competent with git, so I did a quick git bisect that lead me to the exact commit. Awesome. Well, awesome until I saw the amazingly worthless commit message, "Oh, and some more changes". Thanks, Bryan-from-the-Past, you're a jerk.

@bryanburgers
bryanburgers / keybase.md
Created March 12, 2014 21:06
keybase proof

Keybase proof

I hereby claim:

  • I am bryanburgers on github.
  • I am bryanburgers (https://keybase.io/bryanburgers) on keybase.
  • I have a public key whose fingerprint is 051A 4705 8C33 E731 B1B2 ECF7 DC57 3DB9 B226 E7EA

To claim this, I am signing this object:

@bryanburgers
bryanburgers / __uses.scss
Created March 27, 2014 16:00
Media Query mixin
.some-element {
// Default to mobile first.
color: blue;
@include mq(medium) {
// Styles for medium and up.
color: red;
}
@include mq(large) {
import java.time.*;
import java.util.*;
import java.lang.*;
import java.io.*;
public class MainMovie {
public static void main(String[] args) throws IOException {
Scanner input = new Scanner(System.in);
@bryanburgers
bryanburgers / output1.html
Last active August 29, 2015 14:09
I wish I had more control over Structure output
<!-- Basic output -->
<ul>
{exp:structure_output:nav depth="2"}
<li class="{if struct:first}first{/if} {if struct:last}last{/if} {if struct:here}here{/if} {if struct:parent_here}parent-here{/if}">
<a href="{struct:url}">{struct:title}</a>
{if struct:children:count}
<ul>
{struct:children}
</ul>
@bryanburgers
bryanburgers / topics.md
Created December 9, 2014 08:42
ExpressionEngine Developer Roundtable topic suggestions

Namespacing Add-ons

We started talking about this at this month's chat. I'd love for you guys to talk more about this, especially concerning actual PHP namespaces and possibly PSR-4 autoloading and whether that makes sense for loading add-ons.

Composer

Somewhat along those lines, whether it's possible for ExpressionEngine to enable or encourage add-ons to use Composer. I know some add-ons run into issues when another add-on is used that shares a common library. (E.g., https://github.com/click-rain/EE_Twitter/commit/66bcf5c875ee4f02484b0ab19ed45ba6fdc499be.) There's been some interest in using Composer: https://twitter.com/BryantAXS/status/532669889870573568, https://twitter.com/leevigraham/status/359658312981164033.

Easier way to install add-ons

@bryanburgers
bryanburgers / .bashrc
Last active August 29, 2015 14:14
Recent changes to my .bashrc file
# ...
# Open up WAMP's Apache httpd.conf in Sublime, so I can add a vhost
alias vhosts='/c/Program\ Files/Sublime\ Text\ 2/sublime_text.exe /c/wamp/bin/apache/apache2.4.2/conf/httpd.conf'
# Restart WAMP's Apache to pick up vhost changes
alias apacherestart='NET STOP wampapache && NET START wampapache'
# Edit the hosts file
alias hosts='vi /c/Windows/System32/drivers/etc/hosts'
@bryanburgers
bryanburgers / template.html
Created May 14, 2015 02:30
Group adjacent blocks of the same type together.
{!--
> Awesome. Just had an Ah-ha! moment. Build small blocks, then add
> multiple Block fields to a channel with specific blocks in.
-- @JayHealy, https://twitter.com/JayHealey/status/598668322301837312
--}
{cf_page_content}