Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / README.md
Created January 4, 2010 02:38
imagesLoaded() jquery plugin
<!DOCTYPE html>
<!-- Helpful things to keep in your <head/>
// Brian Blakely, 360i
// http://twitter.com/brianblakely/
-->
<head>
<!-- Disable automatic DNS prefetching.
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active November 12, 2023 23:00
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@knownasilya
knownasilya / index.html
Last active November 6, 2023 18:45 — forked from Hagith/drawing-tools.html
Google Maps Advanced Drawing
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<title>Drawing Tools</title>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script>
<style type="text/css">
#map, html, body {
@alekseykulikov
alekseykulikov / index.md
Last active April 14, 2024 00:32
Principles we use to write CSS for modern browsers

Recently CSS has got a lot of negativity. But I would like to defend it and show, that with good naming convention CSS works pretty well.

My 3 developers team has just developed React.js application with 7668 lines of CSS (and just 2 !important). During one year of development we had 0 issues with CSS. No refactoring typos, no style leaks, no performance problems, possibly, it is the most stable part of our application.

Here are main principles we use to write CSS for modern (IE11+) browsers:

@dakoctba
dakoctba / gist:7377d540af76a4f88650b71fc38c7a01
Last active April 7, 2017 09:54
Module build failed: Error: (...) mozjpeg/vendor/cjpeg: Syntax error: ")" unexpected

If you received the following error:

ERROR in ./assets/big.jpg
Module build failed: Error: /home/vagrant/apps/webpack-tests/node_modules/mozjpeg/vendor/cjpeg: 1: /home/vagrant/apps/webpack-tests/node_modules/mozjpeg/vendor/cjpeg: Syntax error: ")" unexpected

    at Promise.all.then.arr (/home/vagrant/apps/webpack-tests/node_modules/execa/index.js:201:11)
    at process._tickCallback (internal/process/next_tick.js:103:7)
 @ ./src/image_viewer.js 3:11-39
 @ ./src/index.js