Skip to content

Instantly share code, notes, and snippets.

View keyserfaty's full-sized avatar
🏠
Working from home

karen keyserfaty

🏠
Working from home
View GitHub Profile
var gistPrefix = 'https://gist.github.com/',
// Cache document.write so that it can be restored once all Gists have been
// embedded.
cachedWrite = document.write,
body = $('body'),
// Map each p.gist to an object that contains the paragraph to be replaced
// and the Gist's identifier.
gists = $('a.gist').map(function(n, a) {
a = $(a);
var href = a.attr('href');
@keyserfaty
keyserfaty / Basics
Last active August 19, 2016 04:49
Basics después de formateo
// git
sudo apt-get install git
// node (installs n which would then bring npm/node)
curl -L http://git.io/n-install | bash
n latest
// nodemon
sudo npm install -g nodemon
@keyserfaty
keyserfaty / postAngular.js
Last active September 20, 2015 19:05
$http.post Angular
$http.post(url, data, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
},
transformRequest: function(data) {
return $.param(data);
}
}).
success(function(data, status, headers, config) {
if (data.error) {
@keyserfaty
keyserfaty / gruntfilesrc.js
Created September 20, 2015 19:04
Grunt file src
less: {
development: {
files: [{
expand: true, // Enable dynamic expansion.
cwd: 'public/less', // Src matches are relative to this path.
src: ['*.less'], // Actual pattern(s) to match.
dest: 'public/css', // Destination path prefix.
ext: '.css', // Dest filepaths will have this extension.
}]
}
Cómo escribir mejor, según investigaciones: http://educationbythenumbers.org/content/3-lessons-science-teach-writing_2194/
Técnicas de estudio (muy interesante, no como lo que hay en todos lados): http://www.oxbridgenotes.com/articles/autodidactism/malgorithms
Referencias de Python:
El libro: http://learnpythonthehardway.org/book/ex21.html
Un recorrido: http://simeonfranklin.com/python-fundamentals/
Code like a Pythonista: http://python.net/~goodger/projects/pycon/2007/idiomatic/handout.html
@keyserfaty
keyserfaty / gist:01e5e734b2afaa1ab386
Created September 20, 2015 19:07
roadmap js/html5/jquery
Roadmap Javascript:
- Head First Javascript.
- Eloquent Javascript (para algunos temas puntales, aunque es un libro corto).
*
- Javascript Cookbook (como referencia).
* Acá podría ir Head First jQuery
Configuración:
git config --global user.name nombredeusuario
git config --global user.email emaildeusuario
Work flow:
git status
git add .
@keyserfaty
keyserfaty / gist:dc4ea3efc8563d03d20c
Created September 28, 2015 17:50
grunt file paths
// You can specify single files:
{src: 'foo/this.js', dest: ...}
// Or arrays of files:
{src: ['foo/this.js', 'foo/that.js', 'foo/the-other.js'], dest: ...}
// Or you can generalize with a glob pattern:
{src: 'foo/th*.js', dest: ...}
// This single node-glob pattern:
{src: 'foo/{a,b}*.js', dest: ...}
// Could also be written like this:
@keyserfaty
keyserfaty / awes61.js
Created January 20, 2016 11:40
What I learned from my Angular + Webpack + ES6 journey: examples
export default class Thing {
constructor ($q) {
this.$q = $q;
}
doStuff (a, b) {
let { $q } = this;
return a + b;
}
}
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _createClass = (function() {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];