Skip to content

Instantly share code, notes, and snippets.

View tomaspietravallo's full-sized avatar

Tomás Pietravallo tomaspietravallo

View GitHub Profile
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@amberj
amberj / rgb-colored-echo.sh
Last active April 25, 2024 21:45
A bash pretty print script that provides following red/green/blue colored echo functions.
#!/bin/bash
#
## @file rgb-colored-echo.sh
## @author Amber Jain
## @section DESCRIPTION A bash pretty print script which provides red/green/blue colored echo functions
## @section LICENSE ISC
#################
# Documentation #
@mbostock
mbostock / .block
Last active February 25, 2024 17:46
Closest Point on Path
license: gpl-3.0
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 18, 2024 15:46
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@jjgrainger
jjgrainger / Vector.js
Last active May 27, 2023 22:59
A simple Vector class in javascript
var Vector = function(x, y) {
this.x = x || 0;
this.y = y || 0;
};
// return the angle of the vector in radians
Vector.prototype.getDirection = function() {
return Math.atan2(this.y, this.x);
};
@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@adcreare
adcreare / npm-beta-publish.md
Last active April 29, 2024 19:21
npm publish a beta package

Steps to publish a npm package to beta that won't be available via latest and won't auto install on ncu updates etc

  1. Ensure any compile is run npm run dist etc
  2. Modify version in package.json to the following format (match with existing verion numbers etc) "version": "0.1.120-beta.1" where beta.x is the number of those betas
  3. Publish to npm npm publish --tag beta

There are two options for install:

  • Always install beta with npm install packagename@beta
  • Install specific version with npm install package@0.1.120-beta.1
property open_folder : true
property touch_file : false
property time_fmt : 1
property bring_to_front : true
property organized_folder : ""
property ignore_kinds : {"Safari download", "Finder Document"}
-- Add suffixes to ignore. don't include the '.'
property ignore_suffix : {"nzb", "torent"}
property date_fmt : "+%Y-%m-%d" --
(*
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
#! /bin/bash
# export all arproj found in sub directories. e.g. you want to export several projects in one folder
for i in */*.arproj
do
echo "============================"
/Applications/Spark\ AR\ Studio/Spark\ AR\ Studio.app/Contents/MacOS/sparkTerminalAppleMac export "$i" -d ./
echo "============================"
done