Skip to content

Instantly share code, notes, and snippets.

View charrismatic's full-sized avatar
☝️
Life is Code

Matt Harris charrismatic

☝️
Life is Code
View GitHub Profile
@charrismatic
charrismatic / react_native_require_ quirks.js
Last active August 17, 2019 21:06
Notes on require function in react native
const REL_PATH = '..';
const ASSET_DIR = 'assets';
const IMAGE_DIR = 'images';
// THIS ONE WORKS
function testVariableRequire() {
var name = 'pause_button.png';
var button_module = new Icon('test', require(`./${REL_PATH}/${ASSET_DIR}/${IMAGE_DIR}/${name}`), 70, 119);
@charrismatic
charrismatic / find-exec-grep.md
Last active August 10, 2019 20:47
Linux commands explained

find, filter, execute... , grep, replace

find ./data -type f -name "*.csv" -exe cat {} \; | grep "andres" | sed '/  //g'

the same thing broken down by each action

@charrismatic
charrismatic / Awesome_Links.md
Last active July 25, 2019 05:45
Data Science Links and References
@charrismatic
charrismatic / img-metatdata.md
Last active July 15, 2019 20:37
CashApp QR Code Encoded Data

Image meta data

command

identify -verbose mattharrisqr.jpg > metadata.txt

Output

@charrismatic
charrismatic / README.md
Created April 22, 2019 04:58 — forked from yang-wei/README.md
ES6 destructing (and rest parameter)

We will first discussed how destructing and rest parameters can be used in ES6 - in arrays and objects. Then we will look at a few examples and also discuss some quiz.

arrays

var array = [1, 2, 3, 4];
var nestedArray = [1, 2, 3, 4, [7, 8, 9]];

var [a, b, c, d] = array;
console.log(a, b, c, d)
@charrismatic
charrismatic / _mixin_widths.scss
Created April 21, 2019 03:21
SASS Media Query Mixins Example
////
/// @group layout
////
///
/// @name max_width
/// @description Insert media content when less than target width
/// @param {number} $width [max width value]
@mixin max_width($width) {
@media screen and (max-width: #{$width}) {
// THE URL FOR THE MAIN INSTAGRAM IMAGE DOES NOT TRIGGER THE DOWNLOAD EVENT
// INSTEAD IT OPENS THE IMAGE IN A NEW TAB
// RUNNING THE SCRIPT THE SECOND TIME TRIGGERS THE DOWNLOAD EVENT
// KEYBOARD SHORTCUT MAKES THIS TWO STEP PROCESS VERY QUICK
// Step 1: `ctrl`+`shift`+`i` -> `ctrl`+`enter`
// Step 2: `ctrl`+`enter`
var filename = '';
var target = '';
@charrismatic
charrismatic / standard_format_fixers__unix.md
Last active October 18, 2018 06:07 — forked from watson/README.md
A list of search and replace unix commands to help make a node repository 'standard' compliant

The standard code style linter is a great tool by Feross - check it out!

Remove trailing semicolons:

find . -path ./node_modules -prune -o -type f -name '*.js' -exec sed -i '' -e 's/;$//' {} \;

Ensure space between function and opening bracket:

@charrismatic
charrismatic / AAA_README.example.md
Last active October 22, 2018 19:33 — forked from jxson/README.md
README.md template

Always Add A Readme

Backers on Open Collective Sponsors on Open Collective standard-readme compliant

Standard Readme Style

Your README file is normally the first entry point to your code. It should tell people why they should use your module, how they can install it, and how they can use it. Standardizing how you write your README makes creating and maintaining your READMEs easier. Great documentation takes work!

This repository contains:

@charrismatic
charrismatic / simple_args_parsing.sh
Created August 17, 2018 05:37 — forked from jehiah/simple_args_parsing.sh
a simple way to parse shell script arguments
#!/bin/sh
#
# a simple way to parse shell script arguments
#
# please edit and use to your hearts content
#
ENVIRONMENT="dev"