Skip to content

Instantly share code, notes, and snippets.

View j-tap's full-sized avatar
🍀
Development

Igor j-tap

🍀
Development
View GitHub Profile
@j-tap
j-tap / Random-string
Created January 20, 2020 14:58 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@j-tap
j-tap / browsersync-webpack.md
Created May 29, 2019 20:39 — forked from robinrendle/browsersync-webpack.md
Getting set up with Browsersync and Webpack

Fixing our local environment with Browsersync

Whenever we change our templates we still have to use our build script and this can get annoying. Thankfully with webpack-dev-server and BrowserSync we can fix this:

npm i -D browser-sync browser-sync-webpack-plugin webpack-dev-server

BrowserSync will act like a proxy, waiting for webpack to do its thing and then reloading the browser for us.

@j-tap
j-tap / .htaccess
Last active May 27, 2021 18:52 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
# Redirect for dummi
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/welcome.php$
RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png|css|js)$
RewriteRule .* /welcome.php [L,R=302]
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html