Skip to content

Instantly share code, notes, and snippets.

View albertpak's full-sized avatar

Albert Pak albertpak

View GitHub Profile
@albertpak
albertpak / Postmortem
Created September 29, 2020 14:39 — forked from adhorn/Postmortem
Title:
Incident date:
Owner:
Peer-review committee:
Tags:
Summary:
Supporting data:
Customer Impact:
Incident Response Analysis:
Post-Incident Analysis:
@albertpak
albertpak / README.md
Created April 4, 2018 16:43 — forked from sarupbanskota/README.md
Ember + ESLint + Prettier + Ember Suave
  • new ember app & yarn install
  • ember install ember-cli-eslint@4
// ember-cli-build.js
let app = new EmberApp(defaults, {
  eslint: {
    testGenerator: 'qunit',
    group: true,
    rulesDir: 'eslint-rules',
 extensions: ['js'],
@albertpak
albertpak / gist:5f3eea515ae96f508ab8
Last active September 1, 2015 18:41 — forked from olivierlacan/gist:4062929
Code School Screencasting Framework

Screencasting Framework

The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.

Why you should care about screencasting?

You're probably aren't going to take the time to read this document if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.

  1. Communicating more effectively - At Envy Labs we produce screencasts for our clients all the time. Whether it's demoing a new feature or for a presentation for an invester, they're often much more effective and pleasent than a phone call or screen sharing.
@albertpak
albertpak / app.rake
Last active August 29, 2015 14:19 — forked from ChuckJHardy/app.rake
------------ From Rake Task
namespace :app do
# Checks and ensures task is not run in production.
task :ensure_development_environment => :environment do
if Rails.env.production?
raise "\nI'm sorry, I can't do that.\n(You're asking me to drop your production database.)"
end
end
@albertpak
albertpak / fix_env_for_gemsets.sh
Last active September 18, 2015 18:16 — forked from brookr/gist:2493622
How to fix pow not using the correct gemset
# From the project root
rvm env -- `rvm current` >> .powenv

Fixing npm On Mac OS X for Homebrew Users

If you just want to fix the issue quickly, scroll down to the "solution" section below.

Explanation of the issue

If you're a Mac Homebrew user and you installed node via Homebrew, there is a major philosophical issue with the way Homebrew and NPM work together. If you install node with Homebrew and then try to do npm update npm -g, you will see an error like this:

$ npm update npm -g
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
@albertpak
albertpak / gist:8894205
Last active August 29, 2015 13:56 — forked from teejayvanslyke/gist:2569284
Simply paste this snippet into your document ready block to get started, then on any links you'd like to track, simply provide the data-mixpanel-tracker attribute: Specify custom properties in JSON using the data-mixpanel-properties attribute: <a href="/moon" data-mixpanel-tracker="he chose to go to the moon" data-mixpanel-properties="{agency: '…
$('a[data-mixpanel-tracker]').click ->
setTimeout (=> window.location.href = $(@).attr('href')), 300
tracker = $(@).attr('data-mixpanel-tracker')
properties = JSON.parse($(@).attr('data-mixpanel-properties') || '{}')
mixpanel.track tracker, properties
return false

Sublime Text 2 – Useful Shortcuts (Ubuntu)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command palette
Ctrl+` python console
Ctrl+N new file

Editing

Date

Year

%Y - Year with century (can be negative, 4 digits at least) -0001, 0000, 1995, 2009, 14292, etc.

  • %C - year / 100 (round down. 20 in 2009)
  • %y - year % 100 (00..99)