Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Joshua Pinter joshuapinter

🎯
Focusing
View GitHub Profile
@joshuapinter
joshuapinter / .npmrc
Created Mar 14, 2019
Common Configuration Files
View .npmrc
save-exact = true # Saves exact version without needing --save-exact.
@rjnienaber
rjnienaber / install.sh
Created Sep 6, 2018
Compile ImageMagick with WEBP and HEIC support on Ubuntu 16.04
View install.sh
# $ lsb_release -a
# No LSB modules are available.
# Distributor ID: Ubuntu
# Description: Ubuntu 16.04.5 LTS
# Release: 16.04
# Codename: xenial
# $ uname -a
# Linux xps 4.4.0-134-generic #160-Ubuntu SMP Wed Aug 15 14:58:00 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
@akabab
akabab / rm_mysql.md
Last active Nov 14, 2018 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX
View rm_mysql.md

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@waynebloss
waynebloss / README.md
Last active Feb 3, 2022
Testing yarn alias with Deep Dependencies
View README.md

Testing yarn alias with Deep Dependencies

Yarn tip: You can alias a package by using yarn add fake-name@npm:left-pad. Now you can use require("fake-name") to require left-pad.

This could be useful for module level dependency injection or inversion of control...

@karlhorky
karlhorky / .yarnrc
Last active Jan 7, 2022
Configure Yarn's --silent flag with .yarnrc configuration file
View .yarnrc
--silent true
@shieva
shieva / index.js
Created Feb 4, 2018
change timestamp of files in nodejs
View index.js
const moment = require('moment');
const fs = require('fs');
var Utimes = require('@ronomon/utimes');
const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));
const folder = '100';
const files = fs.readdirSync(folder);
// console.log(files)
async function changeTimestamp() {
for (const index in files) {
@sqren
sqren / determine-changed-props.js
Last active Oct 20, 2022
Determine which props causes React components to re-render
View determine-changed-props.js
import React, { Component } from 'react';
export default function withPropsChecker(WrappedComponent) {
return class PropsChecker extends Component {
componentWillReceiveProps(nextProps) {
Object.keys(nextProps)
.filter(key => {
return nextProps[key] !== this.props[key];
})
.map(key => {
@wvteijlingen
wvteijlingen / index.js
Last active Jul 20, 2019
HOC for react-navigation that maps params to props
View index.js
import paramsToProps from 'paramsToProps.js'
const MainNavigator = StackNavigator({
firstScreen: { screen: paramsToProps(FirstScreenComponent) },
secondScreen: { screen: paramsToProps(SecondScreenComponent) },
});
@zfael
zfael / nodejs.checksum.js
Created Jun 20, 2017
NODE.JS - How to generate file's Checksum (CRYPTO)
View nodejs.checksum.js
var fs = require('fs');
var crypto = require('crypto');
fs.readFile('file.pdf', function(err, data) {
var checksum = generateChecksum(data);
console.log(checksum);
});
function generateChecksum(str, algorithm, encoding) {
return crypto
@joyrexus
joyrexus / README.md
Last active Nov 21, 2022
collapsible markdown
View README.md

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")