I don't like Sprockets, but it's the easiest and best choice for lots of Ruby on Rails projects. When looking for a better way to manage my JavaScript assets and an improved developer story, my current tool of choice is webpack. While I wish Rails supported drop-in asset pipelines the way that Phoenix does, it's not hard to use webpack with Rails.
- /r/SuggestALaptop
- /r/linuxhardware
- noteb.com
- productchart
- notebookcheck
- notebookreview
- Code for generating the user_hash value for Intercom's Identity verfication (Note: Identity verification was prevoiusly called Secure Mode)
- Based on http://www.jokecamp.com/blog/examples-of-creating-base64-hashes-using-hmac-sha256-in-different-languages/#ruby
- When creating this for mobile, the final output needs to be in lowercase (the web version accepts both upper and lower case)
- So Javascript code below should only be used for testing unless modified and used to run on a server
| // | |
| // EasyLocalization.swift | |
| // | |
| // Created by Doba Duc on 9/1/15. | |
| // Copyright (c) 2015 Doba Duc. All rights reserved. | |
| // | |
| /// Tiny useful wrapper function of NSLocalizedString in Swift | |
| /// | |
| /// @param key Localizable key |
You can trigger a GitHub Pages (Jekyll) rebuild with a single API call. This is pretty useful for auto-publishing blog posts from a bot like Zapier in conjunction with future: false in your Jekyll config.yml. Just future-date your posts, and they'll go live when that date rolls around. I use a version of this setup for my blog at greghaskins.com.
-
Create a GitHub personal access token and save it somewhere. It needs to have the
repoaccess scope (at least). -
Create a file at the root of your repo (e.g.
.publish) with some dummy content.$ echo ".publish" > .publish
This example loads a CartoDB layer using a crazy SQL from a small variation of this awesome Stack Overflow response. Note the use of CSS style tags for the CartoCSS to allow easy editing.
The uncompressed (and not perfect!) version of the SQL to draw the Voronoi diagram is:
WITH
Sample AS (
SELECT st_setsrid(st_union(the_geom),0) as geom
FROM registro_centros_nz WHERE spanish = 1
),This document describes 4 different solutions to work APIs that consist of multiple blueprint files. Every of this solution work with all Apiary.io features but editing. To edit a blueprint you have to do it outside of Apiary as Apiary editor does not support working with multiple files. In other words if you are using one of the solutions below avoid editing the blueprint in Apiary.
Hercule is a CLI tool written in Node.js – available as an NPM package. It uses markdown referencing and linking syntax to transclude other files into a blueprint file. This solution is universal and would work with any Markdown files not just API Blueprint.
The major benefit – unlike any other solutions here – is also that the references are rendered as HTML links in any Markdown editor so the result is HTML that can be browsed!
Soy Ale Muñoz. Nací en Sevilla, aunque ahora vivo con mi mujer y mi hija en Madrid, donde trabajo para una empresa holandesa, con un equipo repartido por toda Europa, haciendo software que se usa en todos los rincones del mundo.
Me gusta diseñar, cocinar, y sentarme plácidamente a poner la mente en blanco sin hacer absolutamente nada.
Llevo muchos años ayudando a diseñadores y diseñadoras a trabajar menos, fabricando herramientas para automatizar tareas, definiendo procesos de trabajo, o gestionando proyectos de diseño. Si alguna vez habéis trabajado conmigo es posible que os haya contado algún truco para hacer algo más rápido
| import fiona | |
| import click | |
| from rasterio import features, Affine | |
| def makeAffine(bounds, width): | |
| xD = bounds[2] - bounds[0] | |
| yD = bounds[3] - bounds[1] | |
| cS = xD / float(width - 2) | |
| height = int(yD / cS) + 1 |