Skip to content

Instantly share code, notes, and snippets.

View erkattak's full-sized avatar

Erik Straub erkattak

View GitHub Profile
npm install --save @oddnetworks/oddworks
npm install --global @oddnetworks/oddworks-cli

Keybase proof

I hereby claim:

  • I am brkattk on github.
  • I am brkattk (https://keybase.io/brkattk) on keybase.
  • I have a public key ASAXZz9hWCV9VQFBpRdbrid6L4b7H40abmPNakkMgOkZhwo

To claim this, I am signing this object:

@erkattak
erkattak / zip.js
Last active May 24, 2016 18:21
Node.js zip archiver
#!/usr/bin/env node
'use strict';
const _ = require('lodash');
const filepath = require('filepath');
const Promise = require('bluebird');
const Archiver = require('archiver');
const output = filepath.create(process.env.OUTPUT).newWriteStream();
const archive = Archiver('zip');
@erkattak
erkattak / gist:071ab8af1fc64013d955
Last active March 17, 2024 09:37 — forked from svperfecta/gist:141e7c1ae1e610c9cdcd
Example Event RSS Feed

Feed will support xcal (xml representation of ical). This allows us to handle event schedules (PBR) in a nice way

Feed will also support the media rss spec as part of our RSS parsing. This allows a nice way to provide links to assets (images, video, etc) within the rss feed in a standardized way.

Both of these require the tag to add additional XML namespaces (xmlns:media, xmlns:xcal).

These are used within an RSS feed like so:

<?xml version="1.0"?>
<rss version="2.0"
@erkattak
erkattak / BaseActivity.java
Created January 14, 2016 05:35
How to override Activity onBackPressed from a Fragment
public class BaseActivity extends AppCompatActivity {
protected OnBackPressedListener onBackPressedListener;
public void setOnBackPressedListener(OnBackPressedListener onBackPressedListener) {
this.onBackPressedListener = onBackPressedListener;
}
@Override
public void onBackPressed() {
if (onBackPressedListener != null) {
vjs.MediaTechController.prototype.emulateTextTracks = function() {
var player = this.player_,
textTracksChanges,
tracks,
script;
if (!window['WebVTT']) {
script = document.createElement('script');
script.src = player.options()['vtt.js'] || '../node_modules/vtt.js/dist/vtt.js';
player.el().appendChild(script);
export default React.createClass({
// ...
render () {
const style = {
WebkitTransform: 'translateY(' + this.state.translatedYPosition + ')'
}
let containerClassString = this.state.containerExpanded ? LeftNavConstants.CONTAINER_EXPANDED : LeftNavConstants.CONTAINER_COLLAPSED
if (this.state.containerHighlighted) containerClassString += ' ' + LeftNavConstants.CONTAINER_HIGHLIGHTED
@erkattak
erkattak / instructions.md
Created January 22, 2015 14:59
Using opt+→ opt+← and opt+←delete in iTerm2 AND pry

iTerm2 > Preferences > Profiles > Keys

  • Left Option key acts as "Meta"
  • Right Option key acts as "Meta"
  • Opt+→ sends escape sequence of f
  • Opt+← sends escape sequence of b
  • Add Opt+←Delete sends hex code 17
@erkattak
erkattak / gistbook.json
Last active August 29, 2015 14:11 — forked from anonymous/gistbook.json
Anonymous Gistbook
{"title":"Anonymous Gistbook","author":"Anonymous","pages":[{"pageName":"","sections":[{"type":"text","source":"Welcome to Gistbook!"},{"type":"html","source":"<h1>test</h1>"},{"type":"css","source":"h1 { color: red; }"},{"type":"javascript","source":"alert('welcome to the internet');"}]}],"public":true}