Skip to content

Instantly share code, notes, and snippets.

@jpgls
jpgls / gitBitsAndPieces
Created May 10, 2014 05:11
Useful git commands
## Remove files that have already been indexed
$ git rm -r --cached [filesToRemove]
@jpgls
jpgls / list-html-classes
Last active August 29, 2015 14:01
List All Class Names Used on Page
// Temporary code for Development
var elements = document.getElementsByTagName('*');
console.log('$$$$$ - Checked this many elements - ', elements.length);
var unique = function (list, x) {
if (x != "" && list.indexOf(x) === -1) {
list.push(x);
}
return list;
};
@jpgls
jpgls / cssTransitions-multipleProperties.css
Last active August 29, 2015 14:03
CSS Transition Shorthand Syntax for Multiple Properties
.some-selector {
-webkit-transition: height 0.3s ease-out, opacity 0.3s ease 0.5s;
-moz-transition: height 0.3s ease-out, opacity 0.3s ease 0.5s;
-ms-transition: height 0.3s ease-out, opacity 0.3s ease 0.5s; /* IE10 is actually unprefixed */
-o-transition: height 0.3s ease-out, opacity 0.3s ease 0.5s;
transition: height 0.3s ease-out, opacity 0.3s ease 0.5s;
}
/* Adding delay to height property */
.some-selector {
@jpgls
jpgls / photostreamCaveats.md
Created July 3, 2014 21:16
Photostream Caveats

Photostream Syncing Caveats

Wifi obviously, but two things I didn't know -

  • Photostream only syncs when the camera app is closed
  • Photostream only syncs when the battery is above 20%
@jpgls
jpgls / user.less
Created August 7, 2014 23:12
Folding Text - Prelim Custom Stylesheet
// This is your user.less. Use it to override the default styling. When this
// file is first created all lines are commented out (start with //) and so it
// has no effect in the editor's style.
// To change the font uncomment the following line:
@fontFamily: "Input Sans";
// To change the font size uncomment the following line:
@fontSize: 11pt;
@jpgls
jpgls / css-ellipsis.md
Created August 14, 2014 22:40
CSS Ellipsis - Single Line (standard)

CSS Ellipsis Rules

All of these rules need to be in place for CSS Ellipses to work:

.truncate {
  width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@jpgls
jpgls / initialize-repo.sh
Created September 15, 2014 20:15
Initializing a Repo
touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/[[path to repo]].git
git push -u origin master
@jpgls
jpgls / css-content-unicode.md
Created September 15, 2014 23:04
Unicode Characters in CSS Content
@jpgls
jpgls / HLS-alt-audio-iOS8.md
Last active August 29, 2015 14:06
HLS Alternate Audio Tracks - iOS7 vs. iOS8

Changes to HLS Alternate Audio Tracks

iOS7 vs. iOS8

Since iOS 8 went live on Friday and I updated a few of my devices over the weekend, I decided to do some quick testing of web video playback. Wanted to see if there were any little, undocumented changes that would affect REPlayer, or our general approach to HTML video - like the changes to exiting fullscreen video that came in the update from iOS6->iOS71.

Overall, things seem pretty much the same between iOS7->iOS8, and in a quick runthrough, REPlayer looks to be working just fine.

One interesting change to note though, is that the native interface (iOS default controls used when video is fullscreen) for selecting Sub-Title/CC tracks - or Alternate Audio tracks when they're available - no longer seems to recognize/display the audio tracks in iOS8.

Sub-Title selection still works just fine, but the Audio Section (and Audio Tracks) do not display in iOS8. Confirmed that the testing m3u8 still contains Alternate Audio tracks in the m

@jpgls
jpgls / npm-chown.sh
Created October 31, 2014 04:54
shell command to avoid needing to run npm install as root
sudo chown -R [user] ~/.npm