Skip to content

Instantly share code, notes, and snippets.

@phil-a
phil-a / install-old-openssl.sh
Created November 9, 2020 16:55
old-openssl
# Install old openssl
brew tap-new phil/old-openssl
brew extract --version=1.0.2t openssl phil/old-openssl
brew install [email protected]
cd /usr/local/opt
# Remove old symlink
unlink openssl
diff --git a/lib/retro/board/post.ex b/lib/retro/board/post.ex
index 34cb057..9f62a25 100644
--- a/lib/retro/board/post.ex
+++ b/lib/retro/board/post.ex
@@ -4,8 +4,8 @@ defmodule Retro.Board.Post do
schema "posts" do
field :body, :string
- field :likes_count, :integer, default: 0
- field :username, :string, default: "anonymous"
@phil-a
phil-a / index.html.leex
Created April 29, 2020 03:23
/lib/retro_web/live/post_live/index.html.leex
<h1>Listing Posts</h1>
<%= if @live_action in [:new, :edit] do %>
<%= live_modal @socket, RetroWeb.PostLive.FormComponent,
id: @post.id || :new,
title: @page_title,
action: @live_action,
post: @post,
return_to: Routes.post_index_path(@socket, :index) %>
<% end %>
@phil-a
phil-a / git-diff-spreadsheet.md
Created February 19, 2020 17:14 — forked from PrabhatKJena/git-diff-spreadsheet.md
How to git diff for MS-Excel files(xls/xlsx) on Mac-OS

How to git diff for MS-Excel files(xls/xlsx) on Mac-OS

Installation

Prerequisites

  • Requires Java 1.6 or higher.
  • Assumes Java is added to PATH (to check open a cmd and run java -version)
  • No other platform specific requirements
  • A shell script and a bat script are packaged
@phil-a
phil-a / ultimate-ut-cheat-sheet.md
Created November 12, 2019 00:38 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


[user]
signingkey = <MY_SIGNING_KEY>
name = <MY_NAME>
email = <MY_EMAIL>
[alias]
co = checkout
ec = config --global -e
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
cob = checkout -b
049cc5194373a8c7bcd24dce666bc8ee1978be75a536e6a82655086ec00944773b3ae7a8b268c727ebd53e3f074741d54ebe360a31175ec8c175b1c9cc8cb525cd;hisea
@phil-a
phil-a / .jsbeautifyrc
Created February 25, 2018 04:20
.jsbeautifyrc
{
"brace_style": "collapse",
"break_chained_methods": true,
"end_with_newline": true,
"eval_code": false,
"indent_char": " ",
"indent_level": 0,
"indent_size": 2,
"indent_with_tabs": false,
"jslint_happy": false,