Skip to content

Instantly share code, notes, and snippets.

View isubasti's full-sized avatar

Irwan Fario Subastian isubasti

  • Vericus pty ltd
  • melbourne
View GitHub Profile
@isubasti
isubasti / pre_push
Last active August 24, 2022 07:41 — forked from sascha-wolf/pre_push
Elixir pre-push hook for git - ensures files are formatted correctly and credo is satisfied
#!/bin/bash
ask() {
# https://djm.me/ask
local prompt default reply
while true; do
if [ "${2:-}" = "Y" ]; then
prompt="Y/n"
@isubasti
isubasti / prefixed-office-properties.md
Created April 21, 2018 04:35 — forked from p3t3r67x0/prefixed-office-properties.md
MS Office prefixed style properties can be used for older versions of MS Excel, MS PowerPoint or MS Word when you want to save a document, presentation, workbook, or worksheet as a web document, or even in older versions for MS Outlook.

MS Office prefixed style properties

mso-ansi-font-size

Note: Office only

mso-ansi-font-size: large | larger | <length> | medium | <percentage> | small | smaller | x-large | x-small | xx-large | xx-small
@isubasti
isubasti / gh-pages-deploy.md
Created April 4, 2018 03:44 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@isubasti
isubasti / Profilling and Debugging Phoenix Erlang VM.md
Created March 15, 2018 07:20
Profilling and Debugging Phoenix Erlang VM inside/outside nanobox
@isubasti
isubasti / Flexible Dockerized Phoenix Deployments.md
Created February 22, 2018 05:47 — forked from jswny/Flexible Dockerized Phoenix Deployments.md
A guide to building and running zero-dependency Phoenix (Elixir) deployments with Docker. Works with Phoenix 1.2 and 1.3.

Prelude

I. Preface and Motivation

This guide was written because I don't particularly enjoy deploying Phoenix (or Elixir for that matter) applications. It's not easy. Primarily, I don't have a lot of money to spend on a nice, fancy VPS so compiling my Phoenix apps on my VPS often isn't an option. For that, we have Distillery releases. However, that requires me to either have a separate server for staging to use as a build server, or to keep a particular version of Erlang installed on my VPS, neither of which sound like great options to me and they all have the possibilities of version mismatches with ERTS. In addition to all this, theres a whole lot of configuration which needs to be done to setup a Phoenix app for deployment, and it's hard to remember.

For that reason, I wanted to use Docker so that all of my deployments would be automated and reproducable. In addition, Docker would allow me to have reproducable builds for my releases. I could build my releases on any machine that I wanted in a contai

@isubasti
isubasti / README.md
Created November 8, 2017 06:41 — forked from sapessi/README.md
Continuous deployment of React websites to Amazon S3

Continuous deployment of React websites to Amazon S3

This sample includes a continuous deployment pipiline for websites built with React. We use AWS CodePipeline, CodeBuild, and SAM to deploy the application. To deploy the application to S3 using SAM we use a custom CloudFormation resource.

Files included

  • buildspec.yml: YAML configuration for CodeBuild, this file should be in the root of your code repository
  • configure.js: Script executed in the build step to generate a config.json file for the application, this is used to include values exported by other CloudFormation stacks (separate services of the same application).
  • index.js: Custom CloudFormation resource that publishes the website to an S3 bucket. As you can see from the buildspec and SAM template, this function is located in a s3-deployment-custom-resource sub-folder of the repo
  • app-sam.yaml: Serverless Application model YAML file. This configures the S3 bucket and the cu
@isubasti
isubasti / plugins.md
Created July 29, 2017 05:10 — forked from manasthakur/plugins.md
Managing plugins in Vim

Managing plugins in Vim: The basics

Let's say the plugin is at a GitHub URL https://github.com/manasthakur/foo. First get the plugin by either cloning it (git clone https://github.com/manasthakur.foo.git) or simply downloading it as a zip (from its GitHub page).

Adding a plugin in Vim is equivalent to adding the plugin's code properly into its runtimepath (includes the $HOME/.vim directory by default). For example, if the layout of a plugin foo is as follows:

foo/autoload/foo.vim
foo/plugin/foo.vim
@isubasti
isubasti / breakfast club 03-05-2017.MD
Last active May 3, 2017 10:44
[breakfast club 03-05-2017] #tags: breakfast club

What are we doing here?

  • One line strategy recap
    • What was your objective
      • Create a fast, secure, reliable backend
    • What have you done towards that objective
      • As our system now consist of the old kraken(meteor) and pantheon that uses different database, We need to make sure that we only have one source of truth of the data. To make sure that this is the case, an oauth service is created on pantheon so that kraken can access data securely from pantheon
    • How are you measuring your progress
      • nothing yet
  • About Execution
  • What have you learnt that you want to share with the group?
@isubasti
isubasti / breaking changes.MD
Last active May 3, 2017 05:11
breaking changes for kraken connection to microservices

list of breaking changes introduced by using pantheon as data source for froalaEditor.js:

  • isUserALecturer check that requires course's admin list
  • _downloadAssignmentSheet will need to be changed to use pantheon's service
  • submission requires courseId, assignmentId, assignmentName to construct the folder structure and filename on s3
  • assignmentId and courseId is required to construct slingshot folder for images
  • assignment name is required to create the editorDocument