Skip to content

Instantly share code, notes, and snippets.

@tonysaffo
tonysaffo / npm commands
Last active November 2, 2018 09:20
Npm update packages and install
sudo npm i -g npm-check-updates // utility for updating npm packages
sudo npm i -g npm // updating npm
ncu -u // check all updates
sudo npm install --unsafe-perm=true --allow-root // npm i
sudo npm audit fix // npm vulnerable fixes
@mburakerman
mburakerman / package.json
Last active September 26, 2022 17:32
Webpack 4 config.js (SCSS to CSS and Babel) 👌 The Simplest Usage 👌
{
"name": "webpack-sass",
"version": "1.0.0",
"scripts": {
"start": "webpack-dev-server --open --mode development",
"build": "webpack -p"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
@agragregra
agragregra / httpd-vhost.conf
Created March 27, 2016 05:28
XAMPP httpd-vhost.conf
<VirtualHost *:80>
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs/"
ServerName localhost
<Directory "/Applications/XAMPP/xamppfiles/htdocs/">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
@sabotai
sabotai / Cannon.cs
Created October 27, 2015 17:10
unity cannon script
using UnityEngine;
using System.Collections;
public class Cannon : MonoBehaviour {
public Rigidbody bulletBlueprint; // assign in inspector
public Transform bulletOrigin; //position an object to use its position as a spawn point
public float bulletForce = 3000f; //this is the bullet speed. 3000 is the default
bool rotateToClick = false;
@joshbeckman
joshbeckman / animatedScrollTo.js
Created September 30, 2013 14:51
ScrollTo animation using pure javascript and no jquery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;