Skip to content

Instantly share code, notes, and snippets.

View john-d-pelingo's full-sized avatar
🏠
Working from home

John Darryl Pelingo john-d-pelingo

🏠
Working from home
View GitHub Profile
@john-d-pelingo
john-d-pelingo / duplicate_line_xcode.md
Created February 28, 2020 14:24 — forked from emotality/duplicate_line_xcode.md
Xcode - Duplicate Line key binding

Xcode line duplicate

Bind keys to duplicate lines in Xcode

  1. Open below directory in Finder with Cmnd + Shift + G
/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
@john-d-pelingo
john-d-pelingo / update-golang.md
Created September 3, 2019 20:31 — forked from nikhita/update-golang.md
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream

git-zen-testing

Title 1

Lorem ipsum dolor amet letterpress activated charcoal nostrud, aliquip exercitation anim banjo hashtag. Tattooed pop-up helvetica, squid eu ethical kombucha poke. Poke wayfarers photo booth readymade commodo viral unicorn leggings dolore post-ironic butcher. Copper mug chillwave chia williamsburg pork belly DIY officia tempor before they sold out master cleanse bitters PBR&B.

Normcore PBR&B williamsburg, cliche tote bag tempor occupy selvage bitters bespoke tousled mlkshk tilde. Sint laborum adaptogen four loko narwhal chartreuse kombucha put a bird on it gentrify disrupt. Tofu pok pok direct trade banjo officia. Shabby chic ethical aute heirloom street art adaptogen man bun culpa occaecat nostrud hella.

Yuccie deep v put a bird on it leggings, ut photo booth cardigan blue bottle beard. Tumblr yuccie ugh twee tacos authentic. Man braid chicharrones vegan unicorn. Semiotics occupy consequat dolor lyft iPhone in veniam proident direct trade.

const AWS = require("aws-sdk"); // from AWS SDK
const fs = require("fs"); // from node.js
const path = require("path"); // from node.js
// configuration
const config = {
s3BucketName: 'your.s3.bucket.name',
folderPath: '../dist' // path relative script's location
};
@john-d-pelingo
john-d-pelingo / enzyme_render_diffs.md
Created March 13, 2018 19:35 — forked from fokusferit/enzyme_render_diffs.md
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render

Keybase proof

I hereby claim:

  • I am john-d-pelingo on github.
  • I am lyrrad (https://keybase.io/lyrrad) on keybase.
  • I have a public key ASC0aedZRpsl_x-ASNMtJ7DIETVTlHOsMlBzTwrTnobTkAo

To claim this, I am signing this object:

@john-d-pelingo
john-d-pelingo / the-bind-problem.jsx
Created December 27, 2017 23:32 — forked from Restuta/the-bind-problem.jsx
React, removeEventListener and bind(this) gotcha
/* Sometimes it's pretty easy to run ito troubles with React ES6 components.
Consider the following code: */
class EventStub extends Component {
componentDidMount() {
window.addEventListener('resize', this.onResize.bind(this)); //notice .bind
}
componentWillUnmount() {
window.removeEventListener('resize', this.onResize.bind(this));
@john-d-pelingo
john-d-pelingo / Firebase Database API Cheatsheet
Created February 21, 2017 20:54 — forked from odigity/Firebase Database API Cheatsheet
Firebase Database API Cheatsheet
There is no way to store an empty object/array/null value.
There are also no actual arrays. Array values get stored as objects with integer keys.
(If all keys are integers, it will be returned as an array.)
Basically, it's one giant tree of hashes with string keys.
Simply write a value to any location, and the intermediary locations will automatically come into existance.
── Classes ──
DataSnapshot : Container for a subtree of data at a particular location.
@john-d-pelingo
john-d-pelingo / command-prompt.ahk
Created May 21, 2016 13:30
Autohotkey for command prompt. Working keys are close command window (ctrl + w), scroll up/down (ctrl + up / down), paste (ctrl +v).
; Redefine only when the active window is a console window
#IfWinActive ahk_class ConsoleWindowClass
; Close Command Window with Ctrl+w
$^w::
WinGetTitle sTitle
If (InStr(sTitle, "-")=0) {
Send EXIT{Enter}
} else {
Send ^w