Skip to content

Instantly share code, notes, and snippets.

💭
YOLO!

Katherine Giron Pe kathgironpe

💭
YOLO!
Block or report user

Report or block kathgironpe

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kathgironpe
kathgironpe / clamav-mac.md
Created Jul 23, 2019 — forked from zhurui1008/clamav-mac.md
Get ClamAV running on Mac OS X (using Homebrew)
View clamav-mac.md

Get ClamAV running on Mac OS X (using Homebrew)

The easiest way to get the ClamAV package is using Homebrew

$ brew install clamav

Before trying to start the clamd process, you'll need a copy of the ClamAV databases.

Create a freshclam.conf file and configure as so

@kathgironpe
kathgironpe / k2pdfopt.md
Created Jun 14, 2019 — forked from returnwellbeing/k2pdfopt.md
pdf 문서를 킨들에 넣는 방법
View k2pdfopt.md
@kathgironpe
kathgironpe / rails-jsonb-queries
Created Feb 14, 2019 — forked from mankind/rails-jsonb-queries
Rails-5 postgresql-9.6 jsonb queries
View rails-jsonb-queries
http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query
http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails
#payload: [{"kind"=>"person"}]
Segment.where("payload @> ?", [{kind: "person"}].to_json)
#data: {"interest"=>["music", "movies", "programming"]}
Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json)
Segment.where("data #>> '{interest, 1}' = 'movies' ")
Segment.where("jsonb_array_length(data->'interest') > 1")
@kathgironpe
kathgironpe / Guardian JWT.md
Last active Nov 18, 2018 — forked from nikneroz/Guardian JWT.md
Elixir + Phoenix Framework + Guardian + JWT. This is tutorial and step by step installation guide.
View Guardian JWT.md

Elixir + Phoenix Framework + Guardian + JWT + Comeonin

Preparing environment

We need to generate secret key for development environment.

mix phx.gen.secret
# ednkXywWll1d2svDEpbA39R5kfkc9l96j0+u7A8MgKM+pbwbeDsuYB8MP2WUW1hf

Let's generate User model and controller.

@kathgironpe
kathgironpe / WebSockets.md
Created Nov 16, 2018 — forked from subudeepak/WebSockets.md
The problems and some security implications of websockets - Cross-site WebSockets Scripting (XSWS)
View WebSockets.md

WebSockets - An Introduction

WebSockets is a modern HTML5 standard which makes communication between client and server a lot more simpler than ever. We are all familiar with the technology of sockets. Sockets have been fundamental to network communication for a long time but usually the communication over the browser has been restricted. The general restrictions

  • The server used to have a permanent listener while the client (aka browser) was not designated any fixed listener for a more long term connection. Hence, every communication was restricted to the client demanding and the server responding.
  • This meant that unless the client requested for a particular resource, the server was unable to push such a resource to the client.
  • This was detrimental since the client is then forced to check with the server at regular intervals. This meant a lot of libraries focused on optimizing asynchronous calls and identifying the response of asynchronous calls. Notably t
@kathgironpe
kathgironpe / phx-1.4-upgrade.md
Created Nov 15, 2018 — forked from chrismccord/phx-1.4-upgrade.md
Phoenix 1.3.x to 1.4.0 Upgrade Guides
View phx-1.4-upgrade.md

Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.

This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.

Install the new phx.new project generator

The mix phx.new archive can now be installed via hex, for a simpler, versioned installation experience.

To grab the new archive, simply run:

View selection_sort.rb
# Selection sort (very slow on large lists)
a = [9,8,6,1,2,5,4,3,9,50,12,11]
n = a.size - 1
n.times do |i|
index_min = i
(i + 1).upto(n) do |j|
index_min = j if a[j] < a[index_min]
@kathgironpe
kathgironpe / android_instructions_23.md
Created Sep 17, 2018 — forked from agrcrobles/android_instructions_23.md
Setup Android development environment on a Mac
View android_instructions_23.md

Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.

Prerequisites (for Homebrew at a minimum, lots of other tools need these too):

  • XCode is installed (via the App Store)
  • XCode command line tools are installed (xcode-select --install will prompt up a dialog)
  • Java

Install Homebrew:

@kathgironpe
kathgironpe / encoding-video.md
Created Sep 8, 2018 — forked from Vestride/encoding-video.md
Encoding video for the web
View encoding-video.md

Encoding Video

Installing

Install FFmpeg with homebrew. You'll need to install it with a couple flags for webm and the AAC audio codec.

brew install ffmpeg --with-libvpx --with-libvorbis --with-fdk-aac --with-opus
@kathgironpe
kathgironpe / unused_mac.md
Last active Jul 1, 2018
How to install Unused on Mac OS X
View unused_mac.md

Using Homebrew

brew install haskell-stack

git clone git@github.com:joshuaclayton/unused.git

stack update
stack setup
You can’t perform that action at this time.