Skip to content

Instantly share code, notes, and snippets.

View r17x's full-sized avatar
🤘
REconciling...

RiN r17x

🤘
REconciling...
View GitHub Profile
@r17x
r17x / install_nodejs_and_yarn_homebrew.md
Created April 5, 2019 13:50 — forked from nijicha/install_nodejs_and_yarn_homebrew.md
Install NVM, Node.js, Yarn via Homebrew

Install NVM, NodeJS, Yarn via Homebrew

Prerequisites

  • Homebrew should be installed (Command line tools for Xcode are included).

Getting start

Install NVM and NodeJS

  1. Install nvm via Homebrew
@r17x
r17x / docker-cleanup-resources.md
Created March 26, 2019 10:14 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

#!/usr/bin/env node
/**
* @description Image Generator for Splash Screen Mobile Development.
* @author ri7nz <ri7nz.labs@gmail.com>
*
* @todo - [ ] handle sharp if not available in environment.
* @todo - [ ] add image dimensions list for iOS (.ipa) splash image.
* @todo - [ ] handle image type
* @todo - [ ] Send Your Request Feature
* @todo - [ ] handle for potrait or landscape type
@r17x
r17x / buildLogo.js
Created March 24, 2019 15:25
Snippet for generate image size using sharp
#!/usr/bin/env node
const sharp = require('sharp')
const listSize = [500, 192, 150, 64]
const original = sharp('./public/logo.png')
listSize.forEach(imgSize => {
original
.resize(imgSize, imgSize)
.toFile(`./public/logo${imgSize}.png`)
.then(res => {
@r17x
r17x / Injector.js
Created March 14, 2019 13:36
Dependency Injection Javascript
/**
* @link {https://stackoverflow.com/questions/20058391/javascript-dependency-injection}
*/
var Injector = {
dependencies: {},
add : function(qualifier, obj){
this.dependencies[qualifier] = obj;
},
get : function(func){
var obj = new func;
@r17x
r17x / ic_logo.xml
Created March 14, 2019 10:14 — forked from Buom01/ic_logo.xml
TWA splashscreen
<!-- import here your svg logo (in drawables)
See https://stackoverflow.com/questions/30923205/easiest-way-to-use-svg-in-android/39266840#39266840
-->
@r17x
r17x / ComponentFlyHigh.js
Last active December 2, 2022 22:13
HOF (High order fly => Function) x HOC (High Order Component)
import YourComponent from 'your/path/Component'
/**
* @name ComponentFly
* @param {ReactElement} Component
* @param {function} reduceParam
* @return {ReactElement}
* @example
* const ComponentFlying = ComponentFly(YourComponent)(reduceParam)
* Array.map(ComponentFlying)
*/
@r17x
r17x / JavaScriptObject.js
Last active March 14, 2019 00:42
Learning How Object is Work for your Own State Management
/**
* @description Learning How Object is Work for your Own State Management
* @author ri7nz <ri7nz.labs@gmail.com>
* @link {github.com/ri7nz}
* Just For Fun In Javascript 🤟
*/
class CreateYourOwnState {
#state
#stateNameInWindow
constructor() {
/*
 * @description Fly High With Image Handle
 * @ri7nz - Hello :D
 
 */

const FileOrBlob = new File([
  ArrayBuffer 
 || ArrayBufferView

4 March 2019

Github Connect by Default use port 22;

// Checking

$ ssh -vT git@github.com

// output
// debug1: Reading configuration data /etc/ssh/ssh_config