Skip to content

Instantly share code, notes, and snippets.

View paulmelero's full-sized avatar
🖌️

Paul Melero paulmelero

🖌️
View GitHub Profile
@revolunet
revolunet / python-es6-comparison.md
Last active April 11, 2025 10:54
# Python VS JavaScript ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
@robpataki
robpataki / pixi_mc.js
Last active August 29, 2015 14:25
Demonstrating sweat free movieclip creation and clean up in PIXI
/*
This snippet requires PIXI and underscoreJS to work;
The good thing about this approach is that you don't have to manually set the number of total frames
used and file name references used in the animation to build up your texture data; and this technique
also makes it a lot easier to remove the BaseTextures from TextureCache once you no longer need them,
so that you can free up precious memory!
Use this snippet with caution, I quickly scribbled it in, so not sure if it breaks, please let me know
in the comments if you found it useful or found an error. Cheers!
@paulmelero
paulmelero / Hard Cross Browser Opacity
Last active August 29, 2015 14:21
Two versions: with and without `!important`
// Inspired in:
// https://css-tricks.com/snippets/css/cross-browser-opacity/
// http://zerosixthree.se/8-sass-mixins-you-must-have-in-your-toolbox/
// Usage: `@include hardOpacity(1);`, `@include hardOpacity(.5);`
@mixin hardOpacity($valueOpacity) {
$unitOp: unit($valueOpacity);
$valOp: parseInt($valueOpacity);
@paulmelero
paulmelero / Preventing draggable images or selection on every image
Created February 24, 2015 17:28
Preventing downloading images by blocking right click on DOM elements and CSS in modern browsers (made for http://erikaabenia.com/)
img {
/* Preventing draggable images or selection on every image. Use at your own risk. */
-webkit-user-select:none;
-webkit-touch-callout:none; /*Safari, safari mobile; iPhone OS*/
-khtml-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}

Only Web-kit experiment called Julia.js

This is an experiment I'm working on, I want to call it Julia.js.

The only thing thats will cause not working fine on firefox is the -webkit-background-clip: text; thing. Any ideas?

Also I'm planning to add a "save button" via canvas... ;)

Inspired by: Glen Maddern's Pen wxaGg.

Mobile first - hide on scroll menu

Mobile first responsive navigation. On scroll the navigation slides up, on up scroll the menu is slides down.

Small screen menu icon animates to a X when menu is visible.

In the wild:

http://vanamco.com/ http://mailchimp.com/

@paulallies
paulallies / gist:0052fab554b14bbfa3ef
Last active March 31, 2026 18:26
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>
openssl rsa -in MYFILE.pem -pubout > MYFILE.pub
ssh-keygen -f MYFILE.pub -i -m PKCS8
@jbenet
jbenet / simple-git-branching-model.md
Last active April 15, 2026 22:32
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.