Skip to content

Instantly share code, notes, and snippets.

View jryans's full-sized avatar

J. Ryan Stinnett jryans

View GitHub Profile
{
"browser": true,
"devel": true,
"loopfunc": true,
"esnext": true,
"moz": true,
"quotmark": true,
"undef": true,
"unused": true,
"maxerr": 10000,

Keybase proof

I hereby claim:

  • I am jryans on github.
  • I am jryans (https://keybase.io/jryans) on keybase.
  • I have a public key whose fingerprint is 0CDC 5D9C DC4D E9C1 1953 9771 2D10 51DA B386 963C

To claim this, I am signing this object:

@jryans
jryans / gist:9810446
Created March 27, 2014 15:41
moz-git-push
# Clone the target mercurial repo
$ hg clone http://hg.mozilla.org/integration/fx-team
# Then when you are ready to land, first ensure cleaning up the mercurial repo
$ cd ~/fx-team && hg strip --no-backup 'roots(outgoing())' && hg pull -u
# Then transfer your commits from git to mercurial
# Here for just some very specific changesets
$ cd git-mozilla-central-repo/ && git push-to-hg -t REV1..REV2 ~/fx-team
# Or just one

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jryans
jryans / update.sh
Created September 4, 2013 20:07
B2G Hotfix: Update JS without a full B2G build
#!/bin/sh
adb shell mount -o rw,remount /system
adb shell stop b2g && \
cd tmp && rm -rf * && \
unzip ../omni.ja.orig ; \
rm ../omni.ja ; \
cp ../shell.js chrome/chrome/content/shell.js && \
cp ~/mozilla/git/toolkit/devtools/server/main.js modules/devtools/server/ && \
@jryans
jryans / gist:5146561
Created March 12, 2013 20:12
diff-rm
git diff --diff-filter=D --name-only origin/master...fix-deps | xargs -n 1 pkg-exec git rm

Viz Startup Time

  • Before: 1.91s
  • After: 0.97s

Startup Data Transferred

  • Before: 186 KB
  • After: 137 KB
@jryans
jryans / mobile.md
Created November 27, 2012 16:13
Mobile Strategy

This is an opinionated technical design for our mobile strategy. We can use this to frame our discussion and evolve it as new decisions are made.

What does "mobile" mean?

Mobile means a lot of different things to different people. It's really not just one extra case to consider. In the context of our visualizations, we should think about each of the following use cases:

  1. Visualization embedded into client's responsive site:
  • Viewed on a desktop
  • Viewed on a tablet
  • Viewed on a smartphone
@jryans
jryans / gist:3795829
Created September 27, 2012 19:08
Adobe Update Errors
DPS Desktop Tools CS6 2.04.1 Update
Installation Successful. Error Code: U44M1I0
Adobe Media Encoder CS6 6.0.2 Update
Installation Successful. Error Code: U44M1I0
Adobe InDesign CS6 8.0.1 update
Installation Successful. Error Code: U44M1I0
@jryans
jryans / add_fields.rb
Created August 22, 2012 16:31
Add fields to all specs
def insert_at(parent, pos, new_field)
parent.viz_fields.all(:conditions => ['position >= ?', pos]).each do |child|
child.position += 1
child.save
end
new_field[:position] = pos
parent.viz_fields.create(new_field)
end