Skip to content

Instantly share code, notes, and snippets.

View albertpak's full-sized avatar

Albert Pak albertpak

View GitHub Profile
@albertpak
albertpak / _document.js
Created April 28, 2021 18:04
Add FB Chat messenger to NextJS
// In case anyone else needs this, here's what I done to add FB Messenger code to my NextJS app - As mentioned before, you need to drop the plugin code into `_document.js` and modify `script` tag
import Document, { Html, Head, Main, NextScript } from 'next/document';
export default class MyDocument extends Document {
render() {
return (
<Html>
<Head>
{/* code that you want to add to the header */}
@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 / aws_cognito.md
Last active July 15, 2018 08:01
AWS Cognito Credentials

You can find all the creds in your AWS Account in Cognito section:

const awsConfig = {
  identityPoolId: 'XX',  (Federated Identities > Selected Identity Pool/Create new > Sample code > Select Javascript > Get AWS Credentials)
  region: 'us-east-1', (User pools > General Settings > Pool Id) The first part of the Pool Id us-east-1
  userPoolId: 'us-east-1_XXXXXX', (User pools > General Settings > Pool Id)
  userPoolWebClientId: 'XXXXXXXXX', (User pools > General Settings > App clients > App client id)
};
@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'],
0x6edDFd09858F5eE15460aC6e4519e815AA9218cF
@albertpak
albertpak / ngrok_setup.sh
Created November 10, 2015 16:09
Setting up ngrok with rails - make sure that ports match
bin/rails s -p 3030 -b 127.0.0.1
~/ngrok http 3030
@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 / rename_git_branch
Created February 23, 2015 17:42
Rename local and remote branch
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@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