Skip to content

Instantly share code, notes, and snippets.

View nobuti's full-sized avatar
Stop me

Buti nobuti

Stop me
View GitHub Profile
@jondot
jondot / Assetfile
Created January 11, 2013 11:14
Assetfile
require 'rake-pipeline-web-filters'
output "public"
class Rake::Pipeline::DSL::PipelineDSL
def production?
ENV['RAKEP_MODE'] == 'production'
end
end
@ramiroaznar
ramiroaznar / styleCities.css
Created September 30, 2016 09:36
How to hide and show layers with CartoCSS based on zoom
/** cities style */
#populated_places{
marker-fill-opacity: 0.8;
marker-line-color: #FFF;
marker-line-width: 0.2;
marker-line-opacity: 0.7;
marker-placement: point;
marker-type: ellipse;
marker-width: 10;
@ramiroaznar
ramiroaznar / readme.md
Last active February 3, 2017 11:54
Como hacer el mapa de Geología de España (Península Ibérica y Baleares) con CARTO BUILDER

Four solutions

I have worked first with the file downloaded to make sure I got the result right. Those drafts are not here.

After that we have four solutions:

  1. A simple one that fetches the entire payload in one request.
  2. An streamed one, same idea, but processing by chunks.
  3. A parallel approach that speeds up the download using HTTP range requests.
  4. A variant of the previous one that parallelizes the computation as well.
@jeffreyiacono
jeffreyiacono / Rakefile
Created February 8, 2012 20:15
rake task for precompiling assets using sprockets within a sinatra app + view helpers
require 'rubygems'
require 'bundler'
Bundler.require
require './application'
namespace :assets do
desc 'compile assets'
task :compile => [:compile_js, :compile_css] do
end
@dverbovyi
dverbovyi / gulpfile.js
Last active January 19, 2021 12:41
ES6 project with Gulp, Sass, Babel & Browserify
/**
* Created by Dmytro on 3/27/2016.
*/
var browserify = require('browserify'),
gulp = require('gulp'),
sourcemaps = require('gulp-sourcemaps'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
source = require('vinyl-source-stream'),
buffer = require('vinyl-buffer'),
@toolmantim
toolmantim / Makefile
Last active December 5, 2022 23:14
An example of using Make instead of Grunt for fast, simple and maintainable front-end asset compilation.
# A simple Makefile alternative to using Grunt for your static asset compilation
#
## Usage
#
# $ npm install
#
# And then you can run various commands:
#
# $ make # compile files that need compiling
# $ make clean all # remove target files and recompile from scratch
@javivelasco
javivelasco / reactive-2016.md
Last active January 10, 2023 19:45
Proposal for lightning talk at Reactive Conf 2016

Please star ⭐️ the gist to help! This is a proposal for a ⚡️ talk at Reactive Conference.

Styling Components in React Toolbox 2

I wrote react-toolbox and presented it almost a year ago in lighning talk at Reactive Conf 2015 in Bratislava. At first it was just a proof of concept of a component library styled with CSS Modules and SASS. Now the project has grown quite a bit, and during this year there has been tons of changes and lessons learned.

Theming and customization is one of the most difficult and interesting problems to solve. For the first version we needed a custom Webpack loader to generate themes and doing simple style overrides was very painful. Today I'm working on a new playground that will allow you try CSS Modules live, and to create React Toolbox themes on the f

@harrietty
harrietty / RAILS_5_CHEATSHEET.md
Last active August 13, 2023 00:36 — forked from mdang/RAILS_CHEATSHEET.md
Ruby on Rails 5 Cheatsheet

Ruby on Rails Cheatsheet (5.1)

Architecture

RVM

$ rvm list - show currently installed Rubies

@addyosmani
addyosmani / package.json
Last active January 18, 2024 21:31
npm run-scripts boilerplate
{
"name": "my-app",
"version": "1.0.0",
"description": "My test app",
"main": "src/js/index.js",
"scripts": {
"jshint:dist": "jshint src/js/*.js",
"jshint": "npm run jshint:dist",
"jscs": "jscs src/*.js",
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js",